From 519109b17f58e4cbc032b148a257472c1d0ffa3e Mon Sep 17 00:00:00 2001 From: simonredfern Date: Tue, 16 Dec 2025 19:17:34 +0100 Subject: [PATCH] fixing pre scala-language code blocks --- src/components/ChatMessage.vue | 24 ++++++++++++++++++++++-- src/views/GlossaryView.vue | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/components/ChatMessage.vue b/src/components/ChatMessage.vue index 4928a70..ca6a0bf 100644 --- a/src/components/ChatMessage.vue +++ b/src/components/ChatMessage.vue @@ -100,7 +100,7 @@ export default {
{{ message.error }}
- + \ No newline at end of file + +/* Override Prism.js styling for Scala code blocks to make them readable */ +pre.language-scala { + background-color: #f5f5f5 !important; + color: #333 !important; + font-family: 'Courier New', Courier, monospace !important; + padding: 1em !important; + overflow: auto !important; +} + +pre.language-scala code { + background-color: transparent !important; + color: #333 !important; + font-family: 'Courier New', Courier, monospace !important; +} + +/* Reset all token colors for Scala to ensure readability */ +pre.language-scala .token { + color: #333 !important; +} + diff --git a/src/views/GlossaryView.vue b/src/views/GlossaryView.vue index 55e730e..c90de54 100644 --- a/src/views/GlossaryView.vue +++ b/src/views/GlossaryView.vue @@ -135,4 +135,22 @@ a { .content :deep(a):hover { background-color: #a4b2ce; } + +/* Make Scala code blocks readable */ +.content :deep(pre.language-scala) { + background-color: #f5f5f5 !important; + color: #333 !important; + font-family: 'Courier New', Courier, monospace !important; + padding: 1em !important; +} + +.content :deep(pre.language-scala code) { + background-color: transparent !important; + color: #333 !important; + font-family: 'Courier New', Courier, monospace !important; +} + +.content :deep(pre.language-scala .token) { + color: #333 !important; +}