clampography 2.0.0-beta.9 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Dawid Wąsowski
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dawid Wąsowski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,43 +1,26 @@
1
1
  # 🙌 Clampography
2
2
 
3
- > **WARNING**: Beta 2.0.0 is in development and currently unstable.
3
+ **Clampography** is a typography and theming plugin for [Tailwind CSS v4](https://tailwindcss.com/).
4
4
 
5
- **Clampography** is a pure CSS typography system that uses the
6
- [clamp()](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/clamp)
7
- function for fluid, responsive text scaling. It's designed as an alternative to
8
- [@tailwindcss/typography](https://github.com/tailwindlabs/tailwindcss-typography),
9
- but works with or without [Tailwind CSS](https://tailwindcss.com/). With
10
- [94% global browser support](https://caniuse.com/css-math-functions), it works
11
- on nearly all modern devices.
5
+ When you use Tailwind CSS, the [Preflight](https://tailwindcss.com/docs/preflight) reset removes all browser defaults. You get a completely unstyled baseline, which is great for UI, but terrible for blog articles or documentation pages because all your `<h1>`, `<p>`, `<ul>`, and other tags lose their styling.
12
6
 
13
- - **No default styling:** No colors, borders, transforms, or decorations.
14
- - **Structure only:** Manages size, spacing, weight, and font-family.
15
- - **Smart scaling:** Contextual elements use `em` (relative), blocks use
16
- `clamp()` (fluid).
7
+ **Clampography solves this.** It restores typography defaults and makes them mathematically perfect. It automatically generates a fluid type scale using [CSS clamp() functions](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/clamp). Your text and spacing will scale smoothly between mobile and 4K displays - without writing a single media query.
17
8
 
18
- ## The purpose
9
+ > [!NOTE]
10
+ > Clampography is designed for projects using a build tool like [Vite](https://vitejs.dev/) or [Webpack](https://webpack.js.org/), or a framework with CSS bundling like [Astro](https://astro.build/), [Next.js](https://nextjs.org/), [Remix](https://remix.run/), or [SvelteKit](https://svelte.dev/docs/kit/introduction). With a build tool, unused modules are automatically removed, keeping your CSS bundle small.
11
+ > A build tool is not required - CDN files are also available. However, CDN files cannot be tree-shaken, resulting in a significantly larger CSS file.
19
12
 
20
- [CSS resets](https://en.wikipedia.org/wiki/Reset_style_sheet) like
21
- [Tailwind's Preflight](https://tailwindcss.com/docs/preflight) remove all
22
- browser typography defaults, leaving you with unstyled text. **Clampography**
23
- delivers production-ready text scaling that responds to viewport changes
24
- automatically, while leaving all aesthetic choices to you.
13
+ ## Features
14
+ - 🧮 **Fluid Typography & Spacing:** Smooth scaling from mobile to desktop.
15
+ - 🎨 **Built-in Themes:** `light` and `dark` included. More themes coming soon.
16
+ - 🧩 **Modular:** Enable only what you need.
17
+ - 🎯 **Zero Specificity:** All styles use `:where()` - your own CSS always wins, no `!important` needed.
18
+ - 💬 **TypeScript Ready:** Auto-generated [TypeScript](https://www.typescriptlang.org/) types for all CSS variables.
19
+ - 🌍 **RTL Ready:** Works correctly in right-to-left languages out of the box.
20
+ - 🎨 **Figma Design Tokens:** Theme values exported as `figma-tokens.json` (W3C Design Tokens).
21
+ - 🖨️ **Print & A11y Optimization:** Removes decorations and forces readable black text.
25
22
 
26
- Visit the temporary [demo page](https://next.dav.one/clampography/) to see how
27
- it looks.
28
-
29
- ## Requirements
30
-
31
- Use [Vite](https://vitejs.dev/), [Webpack](https://webpack.js.org/), or similar
32
- build tool for CSS bundling. Popular frameworks like
33
- [Astro](https://astro.build/), [Next.js](https://nextjs.org/),
34
- [Remix](https://remix.run/), and
35
- [SvelteKit](https://svelte.dev/docs/kit/introduction) include CSS bundling by
36
- default and work seamlessly with **Clampography**. Without a build tool, native
37
- CSS `@import` combined with `@layer` has about 91% browser coverage and only
38
- works in browsers released since early 2022.
39
-
40
- ## Installation
23
+ ## 📦 Install
41
24
 
42
25
  ```bash
43
26
  # Install with NPM
@@ -53,21 +36,65 @@ bun install clampography
53
36
  deno install npm:clampography
54
37
  ```
55
38
 
56
- ## Usage
39
+ ## 🛠️ Quick Start
40
+
41
+ ### 1. Basic (Fluid Typography Only)
42
+ This restores typography but keeps it clean. No colors are injected.
57
43
 
58
44
  ```css
59
- /* First import Tailwind CSS */
60
45
  @import "tailwindcss";
46
+ @plugin "clampography";
47
+ ```
61
48
 
62
- /* Then import Clampography */
63
- @import "clampography";
49
+ ### 2. Optimal Experience (Themes + Extra Styles)
50
+ This adds colors, styled forms, and extra decorations.
64
51
 
65
- /* Then you can override Clampography's base styles */
66
- @layer base {
67
- h1 {
68
- font-size: clamp(2.35rem, 1.95rem + 1.5vw, 4rem);
69
- font-weight: 400;
70
- line-height: 1.15;
71
- }
52
+ ```css
53
+ @import "tailwindcss";
54
+ @plugin "clampography" {
55
+ themes: all;
56
+ forms: true;
57
+ extra: true;
72
58
  }
73
59
  ```
60
+
61
+ ```html
62
+ <body data-theme="dark" class="bg-clampography-background text-clampography-text">
63
+ <h1>Fluid Heading</h1>
64
+ <button class="bg-clampography-primary">Action</button>
65
+ </body>
66
+ ```
67
+
68
+ ## ⚙️ Configuration
69
+
70
+ Clampography is highly modular. You can configure it directly in your CSS:
71
+
72
+ ```css
73
+ @plugin "clampography" {
74
+ /* Feature Modules */
75
+ themes: "light, dark" | "all" | false; /* (default: false) */
76
+ base: true | false; /* (default: true) */
77
+ extra: true | false; /* (default: false) */
78
+ forms: true | false; /* (default: false) */
79
+ kbd: true | false; /* (default: false) */
80
+ print: true | false; /* (default: false) */
81
+
82
+ /* Advanced Settings */
83
+ typography: "global" | ".your-class"; /* Scope isolation */
84
+ fluid-min: "320px"; /* Mobile breakpoint */
85
+ fluid-max: "1280px"; /* Desktop breakpoint */
86
+ }
87
+ ```
88
+
89
+ ## 📚 Documentation
90
+ - 📖 **[Complete Usage Guide](docs/usage.md)**
91
+ - 🔄 **[Configuration Flow Diagram](docs/configuration-flow.md)**
92
+ - 🤝 **[Contributing](docs/contributing.md)**
93
+
94
+ ## 🙏 Inspirations
95
+ - [daisyUI](https://daisyui.com/) created by [Pouya Saadeghi](https://saadeghi.com/)
96
+ - The official **Typography** plugin for Tailwind CSS: [tailwindcss-typography](https://github.com/tailwindlabs/tailwindcss-typography)
97
+
98
+ ---
99
+
100
+ **License:** [MIT](LICENSE)
package/css/base.css ADDED
@@ -0,0 +1,501 @@
1
+ @layer base {
2
+
3
+ :where(:root) {
4
+ --clampography-spacing-xs: clamp(0.25rem, 0.0833rem + 0.8333vw, 0.75rem);
5
+ --clampography-spacing-sm: clamp(0.375rem, 0.0833rem + 1.4583vw, 1.25rem);
6
+ --clampography-spacing-md: clamp(0.5rem, 0.1667rem + 1.6667vw, 1.5rem);
7
+ --clampography-spacing-lg: clamp(0.75rem, 0.1667rem + 2.9167vw, 2.5rem);
8
+ --clampography-spacing-xl: clamp(1rem, 0.3333rem + 3.3333vw, 3rem);
9
+ --clampography-list-indent: clamp(1.5rem, 1.3333rem + 0.8333vw, 2rem);
10
+ --clampography-scroll-offset: 5rem;
11
+ --clampography-font-base: Inter, system-ui, -apple-system, 'Segoe UI Variable Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
12
+ --clampography-font-mono: ui-monospace, 'Cascadia Code', 'Cascadia Mono', 'Segoe UI Mono', 'Ubuntu Mono', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
13
+ --clampography-fluid-min: 20;
14
+ --clampography-fluid-max: 80;
15
+ --clampography-h1-min: 1.875;
16
+ --clampography-h1-max: 4;
17
+ --clampography-h1-slope: calc((var(--clampography-h1-max) - var(--clampography-h1-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
18
+ --clampography-h1-base: calc(var(--clampography-h1-min) - var(--clampography-h1-slope) * var(--clampography-fluid-min));
19
+ --clampography-h1-size: clamp(calc(var(--clampography-h1-min) * 1rem), calc(var(--clampography-h1-base) * 1rem + var(--clampography-h1-slope) * 100vw), calc(var(--clampography-h1-max) * 1rem));
20
+ --clampography-h2-min: 1.25;
21
+ --clampography-h2-max: 3;
22
+ --clampography-h2-slope: calc((var(--clampography-h2-max) - var(--clampography-h2-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
23
+ --clampography-h2-base: calc(var(--clampography-h2-min) - var(--clampography-h2-slope) * var(--clampography-fluid-min));
24
+ --clampography-h2-size: clamp(calc(var(--clampography-h2-min) * 1rem), calc(var(--clampography-h2-base) * 1rem + var(--clampography-h2-slope) * 100vw), calc(var(--clampography-h2-max) * 1rem));
25
+ --clampography-h3-min: 1.125;
26
+ --clampography-h3-max: 2.25;
27
+ --clampography-h3-slope: calc((var(--clampography-h3-max) - var(--clampography-h3-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
28
+ --clampography-h3-base: calc(var(--clampography-h3-min) - var(--clampography-h3-slope) * var(--clampography-fluid-min));
29
+ --clampography-h3-size: clamp(calc(var(--clampography-h3-min) * 1rem), calc(var(--clampography-h3-base) * 1rem + var(--clampography-h3-slope) * 100vw), calc(var(--clampography-h3-max) * 1rem));
30
+ --clampography-h4-min: 1;
31
+ --clampography-h4-max: 1.5;
32
+ --clampography-h4-slope: calc((var(--clampography-h4-max) - var(--clampography-h4-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
33
+ --clampography-h4-base: calc(var(--clampography-h4-min) - var(--clampography-h4-slope) * var(--clampography-fluid-min));
34
+ --clampography-h4-size: clamp(calc(var(--clampography-h4-min) * 1rem), calc(var(--clampography-h4-base) * 1rem + var(--clampography-h4-slope) * 100vw), calc(var(--clampography-h4-max) * 1rem));
35
+ --clampography-h5-min: 1;
36
+ --clampography-h5-max: 1;
37
+ --clampography-h5-slope: calc((var(--clampography-h5-max) - var(--clampography-h5-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
38
+ --clampography-h5-base: calc(var(--clampography-h5-min) - var(--clampography-h5-slope) * var(--clampography-fluid-min));
39
+ --clampography-h5-size: clamp(calc(var(--clampography-h5-min) * 1rem), calc(var(--clampography-h5-base) * 1rem + var(--clampography-h5-slope) * 100vw), calc(var(--clampography-h5-max) * 1rem));
40
+ --clampography-h6-min: 0.875;
41
+ --clampography-h6-max: 0.875;
42
+ --clampography-h6-slope: calc((var(--clampography-h6-max) - var(--clampography-h6-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
43
+ --clampography-h6-base: calc(var(--clampography-h6-min) - var(--clampography-h6-slope) * var(--clampography-fluid-min));
44
+ --clampography-h6-size: clamp(calc(var(--clampography-h6-min) * 1rem), calc(var(--clampography-h6-base) * 1rem + var(--clampography-h6-slope) * 100vw), calc(var(--clampography-h6-max) * 1rem));
45
+ --clampography-heading-scale: 1;
46
+ --clampography-h1-scale: var(--clampography-heading-scale);
47
+ --clampography-h2-scale: var(--clampography-heading-scale);
48
+ --clampography-h3-scale: var(--clampography-heading-scale);
49
+ --clampography-h4-scale: var(--clampography-heading-scale);
50
+ --clampography-h5-scale: var(--clampography-heading-scale);
51
+ --clampography-h6-scale: var(--clampography-heading-scale);
52
+ }
53
+
54
+ body {
55
+ font-size: clamp(0.875rem, 0.7917rem + 0.4167vw, 1.125rem);
56
+ line-height: 1.75;
57
+ text-rendering: optimizeLegibility;
58
+ -webkit-font-smoothing: antialiased;
59
+ -moz-osx-font-smoothing: grayscale;
60
+ text-wrap: pretty;
61
+ }
62
+
63
+ :root :where(h1, h2, h3, h4, h5, h6) {
64
+ font-weight: 600;
65
+ scroll-margin-top: var(--clampography-scroll-offset);
66
+ }
67
+
68
+ :root h1 {
69
+ font-size: calc(var(--clampography-h1-size) * var(--clampography-h1-scale));
70
+ line-height: 1.1111;
71
+ font-weight: 800;
72
+ margin-top: 0;
73
+ margin-bottom: var(--clampography-spacing-xl);
74
+ }
75
+
76
+ :root h2 {
77
+ font-size: calc(var(--clampography-h2-size) * var(--clampography-h2-scale));
78
+ line-height: 1.3333;
79
+ font-weight: 700;
80
+ margin-top: var(--clampography-spacing-xl);
81
+ margin-bottom: var(--clampography-spacing-md);
82
+ }
83
+
84
+ :root h3 {
85
+ font-size: calc(var(--clampography-h3-size) * var(--clampography-h3-scale));
86
+ line-height: 1.5;
87
+ margin-top: var(--clampography-spacing-lg);
88
+ margin-bottom: var(--clampography-spacing-sm);
89
+ }
90
+
91
+ :root h4 {
92
+ font-size: calc(var(--clampography-h4-size) * var(--clampography-h4-scale));
93
+ line-height: 1.5;
94
+ margin-top: var(--clampography-spacing-lg);
95
+ margin-bottom: var(--clampography-spacing-sm);
96
+ }
97
+
98
+ :root h5 {
99
+ font-size: calc(var(--clampography-h5-size) * var(--clampography-h5-scale));
100
+ line-height: 1.5;
101
+ margin-top: var(--clampography-spacing-md);
102
+ margin-bottom: var(--clampography-spacing-xs);
103
+ }
104
+
105
+ :root h6 {
106
+ font-size: calc(var(--clampography-h6-size) * var(--clampography-h6-scale));
107
+ line-height: 1.5;
108
+ margin-top: var(--clampography-spacing-md);
109
+ margin-bottom: var(--clampography-spacing-xs);
110
+ }
111
+
112
+ :root :is(h1, h2, h3, h4, h5, h6):first-child {
113
+ margin-top: 0;
114
+ }
115
+
116
+ :root a {
117
+ text-decoration-line: underline;
118
+ cursor: pointer;
119
+ }
120
+
121
+ :root :where(h1, h2, h3, h4, h5, h6) a {
122
+ text-decoration: none;
123
+ }
124
+
125
+ :root menu {
126
+ list-style: none;
127
+ margin-bottom: var(--clampography-spacing-md);
128
+ padding-inline-start: 0;
129
+ }
130
+
131
+ :root menu > li::before {
132
+ display: none;
133
+ }
134
+
135
+ :root hgroup {
136
+ margin-bottom: var(--clampography-spacing-lg);
137
+ }
138
+
139
+ :root hgroup :where(h1, h2, h3, h4, h5, h6) {
140
+ margin-bottom: var(--clampography-spacing-xs);
141
+ }
142
+
143
+ :root hgroup :where(p) {
144
+ margin-top: 0;
145
+ margin-bottom: 0;
146
+ font-size: 0.875em;
147
+ font-weight: 400;
148
+ line-height: 1.5;
149
+ }
150
+
151
+ :root p {
152
+ line-height: 1.75;
153
+ margin-bottom: var(--clampography-spacing-md);
154
+ }
155
+
156
+ :root :where(strong, b) {
157
+ font-weight: 700;
158
+ }
159
+
160
+ :root :where(em, i, cite, var) {
161
+ font-style: italic;
162
+ }
163
+
164
+ :root dfn {
165
+ font-style: italic;
166
+ font-weight: 600;
167
+ }
168
+
169
+ :root small {
170
+ font-size: 0.875em;
171
+ line-height: 1.5;
172
+ }
173
+
174
+ :root :where(code, kbd, samp) {
175
+ font-family: var(--clampography-font-mono);
176
+ font-size: 0.875em;
177
+ -webkit-font-smoothing: auto;
178
+ -moz-osx-font-smoothing: auto;
179
+ }
180
+
181
+ :root kbd {
182
+ font-weight: 600;
183
+ }
184
+
185
+ :root data {
186
+ font-variant-numeric: tabular-nums;
187
+ }
188
+
189
+ :root :where(sub, sup) {
190
+ font-size: 0.75em;
191
+ line-height: 0;
192
+ position: relative;
193
+ vertical-align: baseline;
194
+ }
195
+
196
+ :root sup {
197
+ top: -0.5em;
198
+ }
199
+
200
+ :root sub {
201
+ bottom: -0.25em;
202
+ }
203
+
204
+ :root abbr[title] {
205
+ text-decoration: underline dotted;
206
+ text-underline-offset: 4px;
207
+ cursor: help;
208
+ }
209
+
210
+ :root del {
211
+ text-decoration: line-through;
212
+ }
213
+
214
+ :root ins {
215
+ text-decoration: underline;
216
+ }
217
+
218
+ :root s {
219
+ text-decoration: line-through;
220
+ }
221
+
222
+ :root u {
223
+ text-decoration: underline;
224
+ }
225
+
226
+ :root mark {
227
+ font-style: normal;
228
+ font-weight: inherit;
229
+ }
230
+
231
+ :root address {
232
+ font-style: italic;
233
+ margin-top: var(--clampography-spacing-md);
234
+ margin-bottom: var(--clampography-spacing-md);
235
+ }
236
+
237
+ :root time {
238
+ font-style: normal;
239
+ font-variant-numeric: tabular-nums;
240
+ }
241
+
242
+ :root blockquote {
243
+ margin-top: var(--clampography-spacing-lg);
244
+ margin-bottom: var(--clampography-spacing-lg);
245
+ padding-inline-start: var(--clampography-spacing-md);
246
+ }
247
+
248
+ :root blockquote blockquote {
249
+ margin-top: var(--clampography-spacing-sm);
250
+ margin-bottom: var(--clampography-spacing-sm);
251
+ padding-inline-start: var(--clampography-spacing-sm);
252
+ }
253
+
254
+ :root q {
255
+ font-style: inherit;
256
+ }
257
+
258
+ :root :where(ul, ol) {
259
+ list-style: none;
260
+ margin-bottom: var(--clampography-spacing-md);
261
+ padding-inline-start: var(--clampography-list-indent);
262
+ }
263
+
264
+ :root li {
265
+ position: relative;
266
+ }
267
+
268
+ :root li + li {
269
+ margin-top: var(--clampography-spacing-xs);
270
+ }
271
+
272
+ :root li > :where(p, dl, figure, table, pre) {
273
+ margin-top: 0;
274
+ margin-bottom: 0;
275
+ }
276
+
277
+ :root li > blockquote {
278
+ margin-top: var(--clampography-spacing-sm);
279
+ margin-bottom: var(--clampography-spacing-sm);
280
+ }
281
+
282
+ :root li > :where(ul, ol) {
283
+ margin-top: var(--clampography-spacing-xs);
284
+ margin-bottom: 0;
285
+ }
286
+
287
+ :root ul > li::before {
288
+ content: '';
289
+ position: absolute;
290
+ inset-inline-end: 100%;
291
+ margin-inline-end: 0.75em;
292
+ top: 0.65em;
293
+ width: 0.375em;
294
+ height: 0.375em;
295
+ background-color: currentColor;
296
+ border-radius: 50%;
297
+ }
298
+
299
+ :root ol {
300
+ counter-reset: list-counter;
301
+ }
302
+
303
+ :root ol > li {
304
+ counter-increment: list-counter;
305
+ }
306
+
307
+ :root ol > li::before {
308
+ content: counter(list-counter) '.';
309
+ position: absolute;
310
+ inset-inline-end: 100%;
311
+ margin-inline-end: 0.5em;
312
+ font-weight: 600;
313
+ font-variant-numeric: tabular-nums;
314
+ text-align: end;
315
+ color: currentColor;
316
+ }
317
+
318
+ :root dl {
319
+ margin-top: var(--clampography-spacing-md);
320
+ margin-bottom: var(--clampography-spacing-md);
321
+ }
322
+
323
+ :root dt {
324
+ font-weight: 600;
325
+ margin-top: var(--clampography-spacing-sm);
326
+ }
327
+
328
+ :root dt:first-child {
329
+ margin-top: 0;
330
+ }
331
+
332
+ :root dd {
333
+ margin-inline-start: var(--clampography-spacing-md);
334
+ }
335
+
336
+ :root dt + dd {
337
+ margin-top: var(--clampography-spacing-xs);
338
+ }
339
+
340
+ :root dd + dd {
341
+ margin-top: var(--clampography-spacing-xs);
342
+ }
343
+
344
+ :root dd:last-child {
345
+ margin-bottom: 0;
346
+ }
347
+
348
+ :root pre {
349
+ margin-top: var(--clampography-spacing-md);
350
+ margin-bottom: var(--clampography-spacing-md);
351
+ font-family: var(--clampography-font-mono);
352
+ line-height: 1.6;
353
+ overflow-x: auto;
354
+ -webkit-font-smoothing: auto;
355
+ -moz-osx-font-smoothing: auto;
356
+ }
357
+
358
+ :root pre code {
359
+ font-size: inherit;
360
+ padding: 0;
361
+ background: none;
362
+ border-radius: 0;
363
+ }
364
+
365
+ :root input, :root button, :root textarea, :root select, :root optgroup {
366
+ font-family: inherit;
367
+ font-size: 100%;
368
+ line-height: inherit;
369
+ }
370
+
371
+ :root textarea {
372
+ line-height: 1.5;
373
+ }
374
+
375
+ :root button, :root [type='button'], :root [type='reset'], :root [type='submit'] {
376
+ cursor: pointer;
377
+ }
378
+
379
+ :root fieldset {
380
+ margin-top: var(--clampography-spacing-md);
381
+ margin-bottom: var(--clampography-spacing-md);
382
+ padding: var(--clampography-spacing-sm);
383
+ }
384
+
385
+ :root legend {
386
+ font-weight: 600;
387
+ padding: 0 var(--clampography-spacing-xs);
388
+ }
389
+
390
+ :root label {
391
+ display: inline-block;
392
+ font-weight: 600;
393
+ margin-bottom: var(--clampography-spacing-xs);
394
+ }
395
+
396
+ :root output {
397
+ display: inline-block;
398
+ font-variant-numeric: tabular-nums;
399
+ }
400
+
401
+ :root :where(meter, progress) {
402
+ display: inline-block;
403
+ vertical-align: middle;
404
+ }
405
+
406
+ :root :where(img, video, canvas, audio, iframe, svg) {
407
+ max-width: 100%;
408
+ height: auto;
409
+ vertical-align: middle;
410
+ }
411
+
412
+ :root figure {
413
+ margin-top: var(--clampography-spacing-lg);
414
+ margin-bottom: var(--clampography-spacing-lg);
415
+ }
416
+
417
+ :root figcaption {
418
+ margin-top: 0.375rem;
419
+ font-size: 0.875em;
420
+ line-height: 1.5;
421
+ }
422
+
423
+ :root table {
424
+ width: 100%;
425
+ margin-top: var(--clampography-spacing-md);
426
+ margin-bottom: var(--clampography-spacing-md);
427
+ border-collapse: collapse;
428
+ font-size: 1em;
429
+ line-height: 1.6;
430
+ }
431
+
432
+ :root caption {
433
+ margin-bottom: var(--clampography-spacing-xs);
434
+ font-size: 0.875em;
435
+ font-weight: 600;
436
+ text-align: start;
437
+ }
438
+
439
+ :root th, :root td {
440
+ padding: var(--clampography-spacing-xs) var(--clampography-spacing-sm);
441
+ text-align: start;
442
+ }
443
+
444
+ :root th {
445
+ font-weight: 600;
446
+ }
447
+
448
+ :root thead th {
449
+ vertical-align: bottom;
450
+ }
451
+
452
+ :root tbody th, :root tbody td {
453
+ vertical-align: top;
454
+ }
455
+
456
+ :root tfoot th, :root tfoot td {
457
+ vertical-align: top;
458
+ }
459
+
460
+ :root tbody + tbody {
461
+ border-top-width: 2px;
462
+ }
463
+
464
+ :root hr {
465
+ margin-top: var(--clampography-spacing-xl);
466
+ margin-bottom: var(--clampography-spacing-xl);
467
+ border: 0;
468
+ border-top: 1px solid;
469
+ }
470
+
471
+ :root :where(:focus, :focus-visible) {
472
+ outline-offset: 2px;
473
+ }
474
+
475
+ :root details {
476
+ margin-top: var(--clampography-spacing-md);
477
+ margin-bottom: var(--clampography-spacing-md);
478
+ }
479
+
480
+ :root summary {
481
+ cursor: pointer;
482
+ font-weight: 600;
483
+ }
484
+
485
+ :root details[open] > summary {
486
+ margin-bottom: var(--clampography-spacing-xs);
487
+ }
488
+
489
+ :root dialog {
490
+ font-size: inherit;
491
+ line-height: inherit;
492
+ }
493
+
494
+ :root :where(h1, h2, h3, h4, h5, h6, p, ul:not(li > ul, li > ol), ol:not(li > ul, li > ol), dl, blockquote, figure, table, pre):first-child {
495
+ margin-top: 0;
496
+ }
497
+
498
+ :root :where(p, ul, ol, dl, blockquote, figure, table, pre):last-child {
499
+ margin-bottom: 0;
500
+ }
501
+ }