fix unexpected background color for content lines in dark mode #21

closed
opened by zzstoatzz.io targeting master

first and last line of any page with file content get this unexpected background color that obscures the text (on dark mode at least)

the empty bg: setting seemed to conflict w Tailwind background coloring in the template

<div class="whitespace-pre peer-target:bg-yellow-200 dark:peer-target:bg-yellow-900">

for example, run this in the console on any such page

document.querySelectorAll('code[style*="background-color:#fff"]').forEach(el => {
    el.style.backgroundColor = '';
});

not so familiar w this stack, preemptive sorry if I missed something!

Changed files
-1
appview
pages
-1
appview/pages/pages.go
··· 431 style := styles.Get("bw") 432 b := style.Builder() 433 b.Add(chroma.LiteralString, "noitalic") 434 - b.Add(chroma.Background, "bg:") 435 style, _ = b.Build() 436 437 if params.Lines < 5000 {
··· 431 style := styles.Get("bw") 432 b := style.Builder() 433 b.Add(chroma.LiteralString, "noitalic") 434 style, _ = b.Build() 435 436 if params.Lines < 5000 {