forked from tangled.org/core
this repo has no description

appview: highlight linked lines

Changed files
+16 -2
appview
pages
cmd
syntax
-2
appview/pages/pages.go
··· 498 498 499 499 func (p *Pages) RepoBlob(w io.Writer, params RepoBlobParams) error { 500 500 var style *chroma.Style = styles.Get("catpuccin-latte") 501 - b := style.Builder() 502 - style, _ = b.Build() 503 501 504 502 if params.ShowRendered { 505 503 switch markup.GetFormat(params.Path) {
+16
cmd/syntax/chroma.go
··· 14 14 darkTheme = "catppuccin-macchiato" 15 15 ) 16 16 17 + const ( 18 + targetHl = ` 19 + .chroma .line:has(.ln:target) { 20 + background-color: rgba(140, 143, 161, 0.3); 21 + } 22 + 23 + @media (prefers-color-scheme: dark) { 24 + .chroma .line:has(.ln:target) { 25 + background-color: rgba(128, 135, 162, 0.3); 26 + } 27 + } 28 + ` 29 + ) 30 + 17 31 func main() { 18 32 outFile := flag.String("out", "", "css output file path") 19 33 flag.Parse() ··· 38 52 file.WriteString("\n@media (prefers-color-scheme: dark) {\n") 39 53 formatter.WriteCSS(file, styles.Get(darkTheme)) 40 54 file.WriteString("}\n") 55 + 56 + file.WriteString(targetHl) 41 57 }