Skip to content

Commit 519109b

Browse files
committed
fixing pre scala-language code blocks
1 parent e6890fc commit 519109b

2 files changed

Lines changed: 40 additions & 2 deletions

File tree

src/components/ChatMessage.vue

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default {
100100
</div>
101101
<div v-if="message.error" class="error"><el-icon><Warning /></el-icon> {{ message.error }}</div>
102102
</div>
103-
103+
104104
</template>
105105

106106
<style>
@@ -212,4 +212,24 @@ export default {
212212
.tidot:nth-child(3){
213213
animation-delay:400ms;
214214
}
215-
</style>
215+
216+
/* Override Prism.js styling for Scala code blocks to make them readable */
217+
pre.language-scala {
218+
background-color: #f5f5f5 !important;
219+
color: #333 !important;
220+
font-family: 'Courier New', Courier, monospace !important;
221+
padding: 1em !important;
222+
overflow: auto !important;
223+
}
224+
225+
pre.language-scala code {
226+
background-color: transparent !important;
227+
color: #333 !important;
228+
font-family: 'Courier New', Courier, monospace !important;
229+
}
230+
231+
/* Reset all token colors for Scala to ensure readability */
232+
pre.language-scala .token {
233+
color: #333 !important;
234+
}
235+
</style>

src/views/GlossaryView.vue

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,22 @@ a {
135135
.content :deep(a):hover {
136136
background-color: #a4b2ce;
137137
}
138+
139+
/* Make Scala code blocks readable */
140+
.content :deep(pre.language-scala) {
141+
background-color: #f5f5f5 !important;
142+
color: #333 !important;
143+
font-family: 'Courier New', Courier, monospace !important;
144+
padding: 1em !important;
145+
}
146+
147+
.content :deep(pre.language-scala code) {
148+
background-color: transparent !important;
149+
color: #333 !important;
150+
font-family: 'Courier New', Courier, monospace !important;
151+
}
152+
153+
.content :deep(pre.language-scala .token) {
154+
color: #333 !important;
155+
}
138156
</style>

0 commit comments

Comments
 (0)