1/* Syntax highlighting styles. */
3 --red: var(--default-primary-color-light);
8 --highlight: #ffeb12b3;
10 --comments: var(--red);
11 --literals: var(--magenta);
12 --strings: var(--green);
14 --punctuation: var(--accent-grey);
15 --mark: var(--highlight);
17 @media (prefers-color-scheme: dark) {
18 --red: var(--default-primary-color-dark);
23 --highlight: #fffc42cc;
26 /* Comment, Comment.{Hash, Multiline, Single, Special} */
27 .c, .ch, .cm, .c1, .cs {
28 color: var(--comments);
31 /* Numbers and booleans:
32 * Literal.Number, Literal.Number.{Bin, Float, Hex, Integer, Oct},
34 * Keyword.{Constant, Reserved}
37 .m, .mb, .mf, .mh, .mi, .mo, .il, .kc, .bp, .no {
38 color: var(--literals);
42 * Literal.String, Literal.String.{Affix, Backtick, Char, Delimiter,
43 * …, Doc, Escape, Double, Heredoc, Interpol, Other, Regex, Single,
45 .s, .sa, .sb, .sc, .dl, .sd, .se, .s2, .sh, .si, .sx, .sr, .s1, .ss {
46 color: var(--strings);
50 .n { color: var(--names); }
52 /* Punctuation, Generic.Output */
54 color: var(--punctuation);
57 /* Rust-specific errors */
58 .rustc_error { color: var(--red); font-weight: bold; }
59 .rustc_warning { color: var(--green); }
60 .rustc_value { color: var(--yellow); }
61 .rustc_lineno { color: var(--blue); }
64 background-color: var(--mark);
71/* In console snippets:
73 * - don't allow selecting the $ or the following space
74 * See https://alexwlchan.net/2021/10/console-copying/
75 * See https://stackoverflow.com/a/4407335/1558022
76 * - color the prompt blue
78 * gp = Generic.Prompt, w = Whitespace
81.language-console .gp + .w,
83.language-irb .gp + .w {
85 -webkit-touch-callout: none; /* iOS Safari */
86 -webkit-user-select: none; /* Safari */
87 -khtml-user-select: none; /* Konqueror HTML */
88 -moz-user-select: none; /* Firefox */
89 -ms-user-select: none; /* Internet Explorer/Edge */
90 user-select: none; /* Non-prefixed version, currently
91 supported by Chrome and Opera */
94/* Don't highlight the XML declaration at the top of an XML snippet.
95 * cp = Comment.Preproc*/
97 color: var(--punctuation);
100/* All my Caddy and Go-formatted code uses tabs; ensure it's a 4-wide tab
101 * rather than 8-wide, which is the default stylesheet in Safari */
107/* Highlight HTML tags in blue.
108 * Name.{Tag, Attribute} */
116 /* Don't highlight media queries. */
118 color: var(--body-text);
121 /* Highlight CSS colours in magenta. Name.Constant */
123 color: var(--literals);
126 /* Highlight selectors and properties in blue.
127 * Name.{Class, Tag, Literal, Property} */