lhapaipai / symfony-vite-dev

Monorepo for symfony-vite development
https://symfony-vite.pentatrion.com
Other
19 stars 19 forks source link

Docs: Highlighting issue when using dark mode #12

Closed sven-ahrens closed 5 months ago

sven-ahrens commented 5 months ago

HTML <code></code> elements have the wrong background-color which makes them very hard or almost impossible to read.

Bildschirmfoto 2024-01-17 um 10 02 00

Here is the code that gets applied:

Bildschirmfoto 2024-01-17 um 10 05 12

The background color is: #f8f8f8

I'm not familiar with Vitepress but I think something like this should do the trick:

.dark {
  code {
    background-color: transparent;
    color: white;
  }
}

I tested this in Firefox & Chrome.

lhapaipai commented 5 months ago

Thanks for your feedback @sven-ahrens, I also took the opportunity to remove the white background of the mermaid graphs, it's not perfect but it's not as bad :-)...