UNPKG

5.98 kBCSSView Raw
1@import "../props.media.css";
2
3*, ::before, ::after { box-sizing: border-box; }
4
5:where(:not(dialog)) {
6 margin: 0;
7}
8
9:where(:not(fieldset, progress, meter)) {
10 border-width: 0;
11 border-style: solid;
12 background-origin: border-box;
13 background-repeat: no-repeat;
14}
15
16:where(html) {
17 block-size: 100%;
18 font-family: var(--font-sans);
19 line-height: var(--font-lineheight-3);
20 -webkit-text-size-adjust: none; /* https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/ */
21
22 @media (--motionOK) {
23 scroll-behavior: smooth;
24 }
25}
26
27@media (--motionOK) {
28 :where(:focus-visible) {
29 transition: outline-offset 145ms var(--ease-2);
30 }
31 :where(:not(:active):focus-visible) {
32 transition-duration: .25s;
33 }
34}
35
36:where(:not(:active):focus-visible) {
37 outline-offset: 5px;
38}
39
40:where(body) {
41 min-block-size: 100%;
42}
43
44:where(h1, h2, h3, h4, h5, h6) {
45 line-height: var(--font-lineheight-1);
46 font-weight: var(--font-weight-9);
47}
48
49:where(h1) {
50 font-size: var(--font-size-8);
51 max-inline-size: var(--size-header-1);
52}
53
54:where(h2) {
55 font-size: var(--font-size-6);
56 max-inline-size: var(--size-header-2);
57}
58
59:where(h3) { font-size: var(--font-size-5) }
60:where(h4) { font-size: var(--font-size-4) }
61:where(h5) { font-size: var(--font-size-3) }
62
63:where(h3, h4, h5, h6, dt) {
64 max-inline-size: var(--size-header-3);
65}
66
67:where(p, ul, ol, dl, h6) {
68 font-size: var(--font-size-2);
69}
70
71:where(a, u, ins, abbr) {
72 text-underline-offset: 1px;
73
74 @supports (-moz-appearance: none) {
75 text-underline-offset: 2px;
76 }
77}
78
79:where(a[href], area, button, input, label[for], select, summary, textarea, [tabindex]:not([tabindex*="-"])) {
80 cursor: pointer;
81 touch-action: manipulation;
82 -webkit-tap-highlight-color: transparent;
83}
84
85:where(a) {
86 padding-inline: var(--size-1);
87 margin-inline: calc(var(--size-1) * -1);
88 padding-block: var(--size-1);
89 margin-block: calc(var(--size-1) * -1);
90
91 &:where([href]) {
92 text-decoration-color: var(--indigo-2);
93
94 &:where(:visited) {
95 text-decoration-color: var(--purple-2);
96 }
97 }
98
99 &:where(:not(:hover)) {
100 text-decoration: inherit;
101 }
102}
103
104:where(img, svg, video, canvas, audio, iframe, embed, object) {
105 display: block;
106}
107
108:where(img, svg, video) {
109 max-inline-size: 100%;
110 block-size: auto;
111}
112
113:where(input, button, textarea, select),
114:where(input[type="file"])::-webkit-file-upload-button {
115 font: inherit;
116 font-size: inherit;
117 color: inherit;
118 letter-spacing: inherit;
119}
120
121::placeholder {
122 color: var(--gray-7);
123 opacity: .75;
124}
125
126:where(input:not([type="range"]), textarea) {
127 padding-inline: var(--size-2);
128 padding-block: var(--size-1);
129}
130
131:where(select) {
132 padding-inline: 1.25ch 0;
133 padding-block: .75ch;
134}
135
136:where(textarea, select, input:not([type="button"],[type="submit"],[type="reset"])) {
137 background-color: var(--surface-2);
138 border-radius: var(--radius-2);
139}
140
141:where(textarea) { resize: block }
142
143:where(input[type="checkbox"], input[type="radio"]) {
144 block-size: var(--size-3);
145 inline-size: var(--size-3);
146}
147
148:where(svg:not([width])) {
149 inline-size: var(--size-10);
150}
151
152:where(code, kbd, samp, pre) { font-family: var(--font-mono) }
153:where(:not(pre) > code, kbd) { white-space: nowrap }
154
155:where(pre) {
156 white-space: pre;
157 min-inline-size: 0;
158 max-inline-size: max-content;
159 writing-mode: lr;
160}
161
162:where(:not(pre) > code) {
163 padding: var(--size-1) var(--size-2);
164 background: var(--surface-2);
165 border-radius: var(--radius-2);
166 writing-mode: lr;
167}
168
169:where(kbd, var) {
170 padding: var(--size-1) var(--size-2);
171 border-width: var(--border-size-1);
172 border-color: var(--surface-4);
173 border-radius: var(--radius-2);
174}
175
176:where(mark) {
177 border-radius: var(--radius-2);
178 padding-inline: var(--size-1);
179}
180
181:where(ol, ul) { padding-inline-start: var(--size-8) }
182:where(li) { padding-inline-start: var(--size-2) }
183:where(li, dd, figcaption) { max-inline-size: var(--size-content-2) }
184:where(p) { max-inline-size: var(--size-content-3) }
185:where(dt, summary) { font-weight: var(--font-weight-7) }
186
187:where(dt:not(:first-of-type)) {
188 margin-block-start: var(--size-5);
189}
190
191:where(small) {
192 font-size: max(.5em, var(--font-size-0));
193 max-inline-size: var(--size-content-1);
194}
195
196:where(hr) {
197 margin-block: var(--size-fluid-5);
198 height: var(--border-size-2);
199 background-color: var(--surface-3);
200}
201
202:where(figure) {
203 display: grid;
204 gap: var(--size-2);
205 place-items: center;
206
207 & > :where(figcaption) {
208 font-size: var(--font-size-1);
209 }
210}
211
212:where(blockquote, :not(blockquote) > cite) {
213 border-inline-start-width: var(--border-size-3);
214}
215
216:where(blockquote) {
217 display: grid;
218 gap: var(--size-3);
219 padding-block: var(--size-3);
220 padding-inline: var(--size-4);
221 max-inline-size: var(--size-content-2);
222}
223
224:where(:not(blockquote) > cite) {
225 padding-inline-start: var(--size-2);
226}
227
228:where(summary) {
229 background: var(--surface-3);
230 padding: var(--size-2) var(--size-3);
231 margin: calc(var(--size-2) * -1) calc(var(--size-3) * -1);
232 border-radius: var(--radius-2);
233}
234
235:where(details) {
236 padding-inline: var(--size-3);
237 padding-block: var(--size-2);
238 background: var(--surface-2);
239 border-radius: var(--radius-2);
240}
241
242:where(details[open] > summary) {
243 margin-bottom: var(--size-2);
244 border-end-start-radius: 0;
245 border-end-end-radius: 0;
246}
247
248:where(fieldset) {
249 border-radius: var(--radius-2);
250 border: var(--border-size-1) solid var(--surface-4);
251}
252
253:where(del) {
254 background: var(--red-9);
255 color: var(--red-2);
256}
257
258:where(ins) {
259 background: var(--green-9);
260 color: var(--green-1);
261}
262
263:where(abbr) {
264 text-decoration-color: var(--blue-5);
265}
266
267:where(dialog) {
268 background-color: var(--surface-1);
269 color: inherit;
270 border-radius: var(--radius-3);
271 box-shadow: var(--shadow-6);
272
273 &::backdrop {
274 backdrop-filter: blur(25px);
275 }
276}
277
278:where(html:has(dialog[open])) {
279 overflow: hidden;
280}
281
282:where(menu) {
283 padding-inline-start: 0;
284 display: flex;
285 gap: var(--size-3);
286}
287
288:where(sup) {
289 font-size: .5em;
290}