tangled
alpha
login
or
join now
regnault.dev
/
core
forked from
tangled.org/core
0
fork
atom
Monorepo for Tangled
0
fork
atom
overview
issues
pulls
pipelines
appview: highlight linked lines
oppi.li
10 months ago
229879c2
57d497a0
+16
-2
2 changed files
expand all
collapse all
unified
split
appview
pages
pages.go
cmd
syntax
chroma.go
-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
501
-
b := style.Builder()
502
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
17
+
const (
18
18
+
targetHl = `
19
19
+
.chroma .line:has(.ln:target) {
20
20
+
background-color: rgba(140, 143, 161, 0.3);
21
21
+
}
22
22
+
23
23
+
@media (prefers-color-scheme: dark) {
24
24
+
.chroma .line:has(.ln:target) {
25
25
+
background-color: rgba(128, 135, 162, 0.3);
26
26
+
}
27
27
+
}
28
28
+
`
29
29
+
)
30
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
55
+
56
56
+
file.WriteString(targetHl)
41
57
}