1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/* The base styling of the built-in view elements.
*
* These are the declarations `elements.js` used to apply as inline styles.
* Spec §6 requires styles to compile to static CSS with generated scoped
* class names and zero runtime cost, and §7.1 lists `styles.css` as a
* pipeline output; this file is the base layer `zdc build` copies into it,
* ahead of the scoped classes it generates per program.
*
* Moving them here removes one effect and one `style.setProperty` call per
* declaration per element — seven of each from `counter.zd` alone — and
* makes an element's base styling a byte-for-byte comparable class
* attribute rather than a CSSOM serialisation.
*
* Every byte of this file ships to every reader of every program, so the
* reasoning behind what is here lives in the compiler sources that name
* it, not in this file: the tokens in `style.rs`'s `TOKENS`, the type
* scale and the two element defaults in `elements.rs`'s `STYLE_ARGUMENTS`.
* What is left below is a pointer per block.
*/
/* Theme tokens (#102): nine roles, light here and dark below, so that a
* program names a role and the reader's system picks the colour.
* `color-scheme` is what makes the browser's own furniture follow. */
}
{
}
}
/* The page reads the tokens, or dark mode is custom properties nothing
* uses. This rule is what a program that says nothing about colour gets. */
}
/* The type scale (#89), named by `size is "…"`. In `rem`, so it moves with
* the reader's own font size; custom properties, so an `assets/*.css` can
* retune it without touching a use site. */
}
}
}
/* Preserved whitespace that is not code (#63). The browser's own `pre`
* defaults are monospace and no wrapping, which are right for a listing
* and wrong for a poem or an address block; `CodeBlock` keeps them and
* this is the element that does not. */
}
/* Keyboard focus is visible by default (#100), because without a ring
* tabbing through a page is invisible and "remember to write one" is how
* that becomes most pages. `:focus-visible`, so a mouse click does not
* draw the ring designers strip focus styling to be rid of. */
}
/* A button shows a pointer (#98). A bare element selector, and the only
* one here: at 0,0,1 every generated class beats it, so `cursor is "wait"`
* wins without an `!important`. */
}
/* The error bar reads the tokens too: it named `#b3151c` twice, which is a
* red that disappears against a dark surface. */
}