You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RnQ/Distro/Template/colorizer.css

74 lines
1.7 KiB
CSS

body {
--syntax-highlight: on;
}
@set colorizer {
:root {
aspect: colorize url(colorizer.mjs);
behavior: plaintext;
padding: 0;
flow: vertical;
background: transparent;
border: none;
overflow: scroll-indicator;
font-family: "Consolas", "Segoe UI", "Segoe UI Emoji" !important;
font-size: inherit;
font-rendering-mode: snap-pixel;
display: block;
color: inherit;
line-height: inherit;
tab-size: 4;
}
:root:disabled {
overflow: hidden;
cursor: default;
}
:root[wrap="off"] {
overflow-x: scroll;
overflow-y: scroll;
white-space: pre;
}
:root > text {
margin-left: 3em;
padding-left: 4dip;
cursor: default;
display: list-item;
list-style-type: decimal;
list-marker-color: #999;
color: inherit;
white-space: pre;
background: transparent;
}
:root > text:empty { content: "\200B"; }
:root > text:last-child { padding-bottom: *; }
/*markup*/
text::highlight(tag) { color: #795548; } /*background-color: #f0f0fa;*/
text::highlight(tag-id) { color: #BC6B55; } /*background-color: #f0f0fa;*/
/*source*/
text::highlight(number) { color: #7e047d; }
text::highlight(number-unit) { color: #303f9f; }
text::highlight(string) { color: #607d8b; }
text::highlight(keyword) { color: #303f9f; }
text::highlight(symbol) { color: #795548; }
text::highlight(literal) { color: #7d2e32; }
text::highlight(support) { color: #2e7d32; }
text::highlight(comment) { color: #7E7E7E; font-style: italic; }
text[type=markup] {}
text[type=script].start,
text[type=style].start {
border-top: 1px dashed #ccc;
}
text[type=script].stop,
text[type=style].stop {
border-bottom: 1px dashed #ccc;
}
}
source-code[type] {
style-set: colorizer;
}