Monika
|
I have a book where messages are underlined (I have attached screenshots). The problem is that the underline disappears when I turn on the night mode, and if I want to change the colour of the underline in the dark mode, it doesn’t work @media (prefers-color-scheme: dark) { .Highlight { background-color: white; color:black;}}.
Perhaps someone have some possible solution to make the reading experience similar in both modes?
 
June 5, 2024 at 2:08 pm
|
APLN Moderator
|
Hi Monika,
Thank you for this topic!
A Benetech-certified vendor offered the following solution:
Dark mode in different software applications handles back-ground colors in different ways. Highlighting (background-color in CSS) is usually ignored in Dark Mode.
The best solution we can suggest is to put a border around the highlighted content that will outline the text in dark mode. The CSS should be adjusted to make this possible. We used a red border with yellow highlight in the following example so that the border presence is clearly visible on screen. When we switch to dark mode in Thorium, the highlight disappears but the border remains.
CSS code:
/* ----Testing----- */
/*@media (prefers-color-scheme: dark) { .highlight { background-color: white; color:black;}} */
.highlight {color:black; background:yellow; border:solid; border-color:red;}
@media (prefers-color-scheme: dark) { .highlight { border-style:solid; border-color:white; color:white;}}
Screenshots:




Hope this helps!
June 12, 2024 at 4:48 pm
|
Monika
|
Thank you for your reply! 🙂 I have one more question regarding the dark mode.
Is it possible to change the colour of the decorative elements in dark mode if they are in svg format. Lets say I have svg decorative curly line in black as a separator and I want it to be white in dark mode.
July 22, 2024 at 6:54 am
|