clampography 2.0.0-beta.6 → 2.0.0-beta.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clampography",
3
- "version": "2.0.0-beta.6",
3
+ "version": "2.0.0-beta.8",
4
4
  "description": "Fluid typography system based on CSS clamp() with optional themes and extra styles. A feature-rich alternative to Tailwind CSS Typography plugin.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/base.css ADDED
@@ -0,0 +1,535 @@
1
+ @layer base {
2
+ /* --------------------------------------------------------------------------
3
+ ROOT CONFIGURATION
4
+ -------------------------------------------------------------------------- */
5
+
6
+ :root {
7
+ /* Fluid spacing scale */
8
+ --spacing-xs: clamp(0.5rem, 0.375rem + 0.625vw, 0.75rem);
9
+ --spacing-sm: clamp(0.75rem, 0.5625rem + 0.9375vw, 1.25rem);
10
+ --spacing-md: clamp(1rem, 0.75rem + 1.25vw, 1.5rem);
11
+ --spacing-lg: clamp(1.5rem, 1.125rem + 1.875vw, 2.5rem);
12
+ --spacing-xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
13
+
14
+ /* Utility variables */
15
+ --scroll-offset: 5rem;
16
+
17
+ /* System font stacks - optimal performance & consistency */
18
+ --font-family-base: system-ui, -apple-system, 'Segoe UI', Roboto,
19
+ 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
20
+ --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
21
+ 'Liberation Mono', 'Courier New', monospace;
22
+ }
23
+
24
+ /* --------------------------------------------------------------------------
25
+ BODY - Global Typography Settings
26
+ -------------------------------------------------------------------------- */
27
+
28
+ body {
29
+ font-family: var(--font-family-base);
30
+ font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
31
+ line-height: 1.75;
32
+
33
+ /* Rendering optimizations */
34
+ text-rendering: optimizeLegibility;
35
+ -webkit-font-smoothing: antialiased;
36
+ -moz-osx-font-smoothing: grayscale;
37
+
38
+ /* Progressive enhancement - better line breaks (Chrome 117+, Safari 16.4+) */
39
+ text-wrap: pretty;
40
+ }
41
+
42
+ /* --------------------------------------------------------------------------
43
+ HEADINGS (H1-H6) - Structural Hierarchy
44
+ -------------------------------------------------------------------------- */
45
+
46
+ :where(h1, h2, h3, h4, h5, h6) {
47
+ font-weight: 600;
48
+ scroll-margin-top: var(--scroll-offset);
49
+ }
50
+
51
+ h1 {
52
+ font-size: clamp(2.25rem, 1.95rem + 1.5vw, 3rem);
53
+ line-height: 1.1111;
54
+ font-weight: 800;
55
+ margin-top: 0;
56
+ margin-bottom: var(--spacing-xl);
57
+ }
58
+
59
+ h2 {
60
+ font-size: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
61
+ line-height: 1.3333;
62
+ font-weight: 700;
63
+ margin-top: var(--spacing-xl);
64
+ margin-bottom: var(--spacing-md);
65
+ }
66
+
67
+ h3 {
68
+ font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
69
+ line-height: 1.5;
70
+ margin-top: var(--spacing-lg);
71
+ margin-bottom: var(--spacing-sm);
72
+ }
73
+
74
+ h4 {
75
+ font-size: clamp(1rem, 0.975rem + 0.125vw, 1.125rem);
76
+ line-height: 1.5;
77
+ margin-top: var(--spacing-lg);
78
+ margin-bottom: var(--spacing-sm);
79
+ }
80
+
81
+ h5 {
82
+ font-size: 1rem;
83
+ line-height: 1.5;
84
+ margin-top: var(--spacing-md);
85
+ margin-bottom: var(--spacing-xs);
86
+ }
87
+
88
+ h6 {
89
+ font-size: 0.875rem;
90
+ line-height: 1.5;
91
+ margin-top: var(--spacing-md);
92
+ margin-bottom: var(--spacing-xs);
93
+ }
94
+
95
+ /* --------------------------------------------------------------------------
96
+ LINKS - Clickable Text (Structural Indicators)
97
+ -------------------------------------------------------------------------- */
98
+
99
+ a {
100
+ text-decoration-line: underline;
101
+ text-decoration-thickness: 0.0625em;
102
+ text-underline-offset: 0.15em;
103
+ cursor: pointer;
104
+ }
105
+
106
+ /* Remove underline from heading links */
107
+ :where(h1, h2, h3, h4, h5, h6) a {
108
+ text-decoration: none;
109
+ }
110
+
111
+ /* --------------------------------------------------------------------------
112
+ MENU - Interactive Lists (Toolbars, Navigation)
113
+ -------------------------------------------------------------------------- */
114
+
115
+ menu {
116
+ list-style: none;
117
+ margin-bottom: var(--spacing-md);
118
+ padding-left: 0;
119
+ }
120
+
121
+ /* Remove custom markers from menu items */
122
+ menu > li::before {
123
+ display: none;
124
+ }
125
+
126
+ /* --------------------------------------------------------------------------
127
+ HGROUP - Heading Groups (Title + Subtitle)
128
+ -------------------------------------------------------------------------- */
129
+
130
+ hgroup {
131
+ margin-bottom: var(--spacing-lg);
132
+ }
133
+
134
+ /* Reduce spacing between heading and subtitle */
135
+ hgroup :where(h1, h2, h3, h4, h5, h6) {
136
+ margin-bottom: var(--spacing-xs);
137
+ }
138
+
139
+ /* Subtitle/tagline styling (typically <p>) */
140
+ hgroup :where(p) {
141
+ margin-top: 0;
142
+ margin-bottom: 0;
143
+ font-size: 0.875em;
144
+ font-weight: 400;
145
+ line-height: 1.5;
146
+ }
147
+
148
+ /* --------------------------------------------------------------------------
149
+ TEXT CONTENT - Paragraphs & Inline Elements
150
+ -------------------------------------------------------------------------- */
151
+
152
+ /* Paragraphs */
153
+ p {
154
+ line-height: 1.75;
155
+ margin-bottom: var(--spacing-md);
156
+ }
157
+
158
+ /* Text modifiers - semantic emphasis */
159
+ :where(strong, b) {
160
+ font-weight: 700;
161
+ }
162
+
163
+ :where(em, i, cite, var) {
164
+ font-style: italic;
165
+ }
166
+
167
+ /* Definition term - structural emphasis without forcing italic */
168
+ dfn {
169
+ font-style: normal;
170
+ font-weight: 600;
171
+ }
172
+
173
+ /* Contextual sizing - uses 'em' to scale with parent */
174
+ small {
175
+ font-size: 0.875em;
176
+ line-height: 1.5;
177
+ }
178
+
179
+ /* Code-related elements */
180
+ :where(code:not(pre code), kbd, samp) {
181
+ padding: 0.15em 0.3em;
182
+ }
183
+
184
+ /* Superscript & subscript - essential for scientific notation */
185
+ :where(sub, sup) {
186
+ font-size: 0.75em;
187
+ line-height: 0;
188
+ position: relative;
189
+ vertical-align: baseline;
190
+ }
191
+ sup {
192
+ top: -0.5em;
193
+ }
194
+ sub {
195
+ bottom: -0.25em;
196
+ }
197
+
198
+ /* Abbreviations with titles */
199
+ abbr[title] {
200
+ text-decoration: underline dotted;
201
+ cursor: help;
202
+ }
203
+
204
+ del {
205
+ text-decoration: line-through;
206
+ }
207
+
208
+ ins {
209
+ text-decoration: underline;
210
+ }
211
+
212
+ /* Strikethrough */
213
+ s {
214
+ text-decoration: line-through;
215
+ }
216
+
217
+ /* Underline */
218
+ u {
219
+ text-decoration: underline;
220
+ }
221
+
222
+ /* Mark/Highlight element */
223
+ mark {
224
+ font-style: normal;
225
+ font-weight: inherit;
226
+ }
227
+
228
+ /* Address element */
229
+ address {
230
+ font-style: normal; /* Reset browser default italic */
231
+ margin-top: var(--spacing-md);
232
+ margin-bottom: var(--spacing-md);
233
+ }
234
+
235
+ /* Time element */
236
+ time {
237
+ font-style: normal;
238
+ font-variant-numeric: tabular-nums; /* Monospace numbers for alignment */
239
+ }
240
+
241
+ /* --------------------------------------------------------------------------
242
+ BLOCKQUOTES - Structural Spacing Only
243
+ -------------------------------------------------------------------------- */
244
+
245
+ blockquote {
246
+ margin-top: var(--spacing-lg);
247
+ margin-bottom: var(--spacing-lg);
248
+ padding-left: var(--spacing-md);
249
+ }
250
+
251
+ /* Nested blockquotes - reduced spacing for hierarchy */
252
+ blockquote blockquote {
253
+ margin-top: var(--spacing-sm);
254
+ margin-bottom: var(--spacing-sm);
255
+ padding-left: var(--spacing-sm);
256
+ }
257
+
258
+ /* Inline quotes */
259
+ q {
260
+ font-style: inherit;
261
+ /* Browser adds quotation marks automatically */
262
+ }
263
+
264
+ /* --------------------------------------------------------------------------
265
+ LISTS - Custom Structured Markers (Prose-like)
266
+ -------------------------------------------------------------------------- */
267
+
268
+ /* Reset default list styles to build custom ones */
269
+ :where(ul, ol) {
270
+ list-style: none;
271
+ margin-bottom: var(--spacing-md);
272
+ padding-left: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
273
+ }
274
+
275
+ li {
276
+ position: relative;
277
+ padding-left: 0.375em; /* Space between marker and text */
278
+ }
279
+
280
+ /* Spacing between list items */
281
+ li + li {
282
+ margin-top: var(--spacing-xs);
283
+ }
284
+
285
+ /* Spacing for nested lists */
286
+ li > :where(ul, ol):first-child {
287
+ margin-top: var(--spacing-s);
288
+ }
289
+
290
+ li > :where(ul, ol):not(:first-child) {
291
+ margin-top: var(--spacing-xs);
292
+ }
293
+
294
+ /* Perfectly centered dot relative to the first line of text */
295
+ ul > li::before {
296
+ content: '';
297
+ position: absolute;
298
+ left: -1.125em;
299
+ top: calc(0.875em - 0.1875em);
300
+ width: 0.375em;
301
+ height: 0.375em;
302
+ background-color: currentColor;
303
+ border-radius: 50%;
304
+ }
305
+
306
+ /* Right-aligned numbers for professional look (e.g. "9." aligns with "10.") */
307
+ ol {
308
+ counter-reset: list-counter;
309
+ }
310
+
311
+ ol > li {
312
+ counter-increment: list-counter;
313
+ }
314
+
315
+ ol > li::before {
316
+ content: counter(list-counter) '.';
317
+ position: absolute;
318
+ left: -2.5em;
319
+ width: 1.75em;
320
+ text-align: right;
321
+ font-weight: 600;
322
+ color: currentColor;
323
+ }
324
+
325
+ /* Nested lists - indentation only, spacing handled by li rules above */
326
+ :where(ul, ol) :where(ul, ol) {
327
+ margin-bottom: 0; /* Parent li spacing already handles this */
328
+ padding-left: var(--spacing-md);
329
+ }
330
+
331
+ /* --------------------------------------------------------------------------
332
+ DEFINITION LISTS - Glossaries & Key-Value Pairs
333
+ -------------------------------------------------------------------------- */
334
+
335
+ dl {
336
+ margin-top: var(--spacing-md);
337
+ margin-bottom: var(--spacing-md);
338
+ }
339
+
340
+ dt {
341
+ font-weight: 600;
342
+ margin-top: var(--spacing-sm);
343
+ }
344
+
345
+ /* First dt shouldn't have top margin */
346
+ dt:first-child {
347
+ margin-top: 0;
348
+ }
349
+
350
+ dd {
351
+ margin-left: var(--spacing-md);
352
+ }
353
+
354
+ /* Spacing between term and definition (consistent with lists) */
355
+ dt + dd {
356
+ margin-top: var(--spacing-xs);
357
+ }
358
+
359
+ /* Spacing between multiple definitions (consistent with list items) */
360
+ dd + dd {
361
+ margin-top: var(--spacing-xs);
362
+ }
363
+
364
+ /* Remove bottom margin from last dd */
365
+ dd:last-child {
366
+ margin-bottom: 0;
367
+ }
368
+
369
+ /* --------------------------------------------------------------------------
370
+ CODE BLOCKS - Monospace Typography
371
+ -------------------------------------------------------------------------- */
372
+
373
+ pre {
374
+ margin-top: var(--spacing-md);
375
+ margin-bottom: var(--spacing-md);
376
+ font-family: var(--font-family-mono);
377
+ line-height: 1.6;
378
+ overflow-x: auto;
379
+ }
380
+
381
+ /* Code inside pre blocks */
382
+ pre code {
383
+ font-size: inherit;
384
+ padding: 0;
385
+ background: none;
386
+ border-radius: 0;
387
+ }
388
+
389
+ /* --------------------------------------------------------------------------
390
+ FORMS - Basic Structure
391
+ -------------------------------------------------------------------------- */
392
+
393
+ fieldset {
394
+ margin-top: var(--spacing-md);
395
+ margin-bottom: var(--spacing-md);
396
+ padding: var(--spacing-md);
397
+ border: 0;
398
+ }
399
+
400
+ legend {
401
+ font-weight: 600;
402
+ padding: 0 var(--spacing-xs);
403
+ }
404
+
405
+ /* Form output element - typically displays calculation results */
406
+ output {
407
+ display: inline-block;
408
+ font-variant-numeric: tabular-nums;
409
+ }
410
+
411
+ /* Visual indicator elements - structural spacing only */
412
+ :where(meter, progress) {
413
+ display: inline-block;
414
+ vertical-align: middle;
415
+ }
416
+
417
+ /* --------------------------------------------------------------------------
418
+ MEDIA - Images, Videos, Figures
419
+ -------------------------------------------------------------------------- */
420
+
421
+ :where(img, video) {
422
+ max-width: 100%;
423
+ height: auto;
424
+ }
425
+
426
+ figure {
427
+ margin-top: var(--spacing-lg);
428
+ margin-bottom: var(--spacing-lg);
429
+ }
430
+
431
+ figcaption {
432
+ margin-top: 0.375rem;
433
+ font-size: 0.875em;
434
+ line-height: 1.5;
435
+ }
436
+
437
+ /* --------------------------------------------------------------------------
438
+ TABLES - Structural Layout
439
+ -------------------------------------------------------------------------- */
440
+
441
+ table {
442
+ width: 100%;
443
+ margin-top: var(--spacing-md);
444
+ margin-bottom: var(--spacing-md);
445
+ border-collapse: collapse;
446
+ font-size: 1em;
447
+ line-height: 1.6;
448
+ }
449
+
450
+ caption {
451
+ margin-bottom: var(--spacing-xs);
452
+ font-size: 0.875em;
453
+ font-weight: 600;
454
+ text-align: left;
455
+ }
456
+
457
+ th,
458
+ td {
459
+ padding: var(--spacing-xs) var(--spacing-sm);
460
+ text-align: left;
461
+ }
462
+
463
+ th {
464
+ font-weight: 600;
465
+ }
466
+
467
+ /* Table sections - structural differentiation */
468
+ thead th {
469
+ vertical-align: bottom;
470
+ }
471
+
472
+ tbody th,
473
+ tbody td {
474
+ vertical-align: top;
475
+ }
476
+
477
+ tfoot th,
478
+ tfoot td {
479
+ vertical-align: top;
480
+ }
481
+
482
+ /* Add spacing between tbody sections if multiple exist */
483
+ tbody + tbody {
484
+ border-top-width: 2px;
485
+ }
486
+
487
+ /* --------------------------------------------------------------------------
488
+ SEPARATORS - Spacing Only
489
+ -------------------------------------------------------------------------- */
490
+
491
+ hr {
492
+ margin-top: var(--spacing-xl);
493
+ margin-bottom: var(--spacing-xl);
494
+ border: 0;
495
+ }
496
+
497
+ /* --------------------------------------------------------------------------
498
+ INTERACTIVE ELEMENTS - Accessibility
499
+ -------------------------------------------------------------------------- */
500
+
501
+ :where(:focus, :focus-visible) {
502
+ outline-offset: 2px;
503
+ }
504
+
505
+ details {
506
+ margin-top: var(--spacing-md);
507
+ margin-bottom: var(--spacing-md);
508
+ }
509
+
510
+ summary {
511
+ cursor: pointer;
512
+ font-weight: 600;
513
+ }
514
+
515
+ details[open] > summary {
516
+ margin-bottom: var(--spacing-xs);
517
+ }
518
+
519
+ dialog {
520
+ font-size: inherit;
521
+ line-height: inherit;
522
+ }
523
+
524
+ /* --------------------------------------------------------------------------
525
+ UTILITIES - Margin Cleanup
526
+ -------------------------------------------------------------------------- */
527
+
528
+ :where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, figure, table, pre):first-child {
529
+ margin-top: 0;
530
+ }
531
+
532
+ :where(p, ul, ol, dl, blockquote, figure, table, pre):last-child {
533
+ margin-bottom: 0;
534
+ }
535
+ }
package/src/base.js CHANGED
@@ -1,12 +1,11 @@
1
1
  /**
2
2
  * Base typography and layout styles (structure only, no colors).
3
- * Converted from base.css.
4
3
  */
5
4
  export default {
6
5
  // Global CSS Variables (Spacing & Fonts)
7
6
  "@layer base": {
8
7
  ":root": {
9
- "--spacing-xs": "clamp(0.5rem, 0.45rem + 0.25vw, 0.75rem)",
8
+ "--spacing-xs": "clamp(0.5rem, 0.375rem + 0.625vw, 0.75rem)",
10
9
  "--spacing-sm": "clamp(0.75rem, 0.5625rem + 0.9375vw, 1.25rem)",
11
10
  "--spacing-md": "clamp(1rem, 0.75rem + 1.25vw, 1.5rem)",
12
11
  "--spacing-lg": "clamp(1.5rem, 1.125rem + 1.875vw, 2.5rem)",
@@ -32,12 +31,8 @@ export default {
32
31
 
33
32
  // Shared Heading Structure
34
33
  ":where(h1, h2, h3, h4, h5, h6)": {
35
- "font-weight": "700",
34
+ "font-weight": "600",
36
35
  "scroll-margin-top": "var(--scroll-offset)",
37
- "margin-top": "var(--spacing-lg)",
38
- "margin-bottom": "var(--spacing-xs)",
39
- "text-decoration": "none",
40
- "break-after": "avoid",
41
36
  },
42
37
 
43
38
  // Specific Headings (Values from base.css)
@@ -91,7 +86,6 @@ export default {
91
86
  "text-decoration-thickness": "0.0625em",
92
87
  "text-underline-offset": "0.15em",
93
88
  "cursor": "pointer",
94
- "text-decoration": "underline",
95
89
  },
96
90
 
97
91
  ":where(h1, h2, h3, h4, h5, h6) a": {
@@ -128,7 +122,6 @@ export default {
128
122
  "p": {
129
123
  "line-height": "1.75",
130
124
  "margin-bottom": "var(--spacing-md)",
131
- "margin-top": "0",
132
125
  },
133
126
 
134
127
  // Inline elements
@@ -153,10 +146,10 @@ export default {
153
146
  ":where(code, kbd, samp)": {
154
147
  "font-family": "var(--font-family-mono)",
155
148
  "padding":
156
- "clamp(0.0625rem, 0.05rem + 0.0625vw, 0.125rem) clamp(0.1875rem, 0.15rem + 0.1875vw, 0.3125rem)",
149
+ "clamp(0.0625rem, 0.05rem + 0.0625vw, 0.125rem) clamp(0.1875rem, 0.15rem + 0.1875vw, 0.7125rem)",
157
150
  },
158
151
 
159
- ":where(code:not(pre code))": {
152
+ ":where(code:not(pre code), kbd, samp)": {
160
153
  "padding":
161
154
  "clamp(0.0625rem, 0.05rem + 0.0625vw, 0.125rem) clamp(0.1875rem, 0.15rem + 0.1875vw, 0.3125rem)",
162
155
  },
@@ -215,8 +208,8 @@ export default {
215
208
 
216
209
  // Blockquotes
217
210
  "blockquote": {
218
- "margin-top": "0",
219
- "margin-bottom": "0",
211
+ "margin-top": "var(--spacing-lg)",
212
+ "margin-bottom": "var(--spacing-lg)",
220
213
  "padding-left": "var(--spacing-md)",
221
214
  },
222
215
 
@@ -233,9 +226,8 @@ export default {
233
226
  // Lists
234
227
  ":where(ul, ol)": {
235
228
  "list-style": "none",
236
- "margin-bottom": "0",
237
- "padding-left": "var(--spacing-md)",
238
- "margin-top": "var(--spacing-xs)",
229
+ "margin-bottom": "var(--spacing-md)",
230
+ "padding-left": "clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",
239
231
  },
240
232
 
241
233
  "li": {
@@ -251,6 +243,10 @@ export default {
251
243
  "margin-top": "var(--spacing-xs)",
252
244
  },
253
245
 
246
+ "li > :where(ul, ol)": {
247
+ "margin-top": "var(--spacing-xs)",
248
+ },
249
+
254
250
  "ul > li::before": {
255
251
  "content": "''",
256
252
  "position": "absolute",
@@ -258,13 +254,12 @@ export default {
258
254
  "top": "calc(0.875em - 0.1875em)",
259
255
  "width": "0.375em",
260
256
  "height": "0.375em",
257
+ "background-color": "currentColor",
261
258
  "border-radius": "50%",
262
259
  },
263
260
 
264
261
  "ol": {
265
262
  "counter-reset": "list-counter",
266
- "margin-top": "0",
267
- "margin-bottom": "0",
268
263
  },
269
264
 
270
265
  "ol > li": {
@@ -278,6 +273,7 @@ export default {
278
273
  "width": "1.75em",
279
274
  "text-align": "right",
280
275
  "font-weight": "600",
276
+ "color": "currentColor",
281
277
  },
282
278
 
283
279
  ":where(ul, ol) :where(ul, ol)": {
@@ -286,8 +282,8 @@ export default {
286
282
  },
287
283
 
288
284
  "dl": {
289
- "margin-top": "0",
290
- "margin-bottom": "0",
285
+ "margin-top": "var(--spacing-md)",
286
+ "margin-bottom": "var(--spacing-md)",
291
287
  },
292
288
 
293
289
  "dt": {
@@ -322,12 +318,12 @@ export default {
322
318
  "font-family": "var(--font-family-mono)",
323
319
  "line-height": "1.6",
324
320
  "overflow-x": "auto",
325
- "break-inside": "avoid",
326
321
  },
327
322
 
328
323
  "pre code": {
329
324
  "font-size": "inherit",
330
325
  "padding": "0",
326
+ "background": "none",
331
327
  "border-radius": "0",
332
328
  },
333
329
 
@@ -362,9 +358,8 @@ export default {
362
358
  },
363
359
 
364
360
  "figure": {
365
- "margin-top": "0",
366
- "margin-bottom": "0",
367
- "break-inside": "avoid",
361
+ "margin-top": "var(--spacing-lg)",
362
+ "margin-bottom": "var(--spacing-lg)",
368
363
  },
369
364
 
370
365
  "figcaption": {
@@ -376,8 +371,8 @@ export default {
376
371
  // Tables
377
372
  "table": {
378
373
  "width": "100%",
379
- "margin-top": "0",
380
- "margin-bottom": "0",
374
+ "margin-top": "var(--spacing-md)",
375
+ "margin-bottom": "var(--spacing-md)",
381
376
  "border-collapse": "collapse",
382
377
  "font-size": "0.9375em",
383
378
  "line-height": "1.6",
@@ -393,17 +388,24 @@ export default {
393
388
  "th, td": {
394
389
  "padding": "var(--spacing-xs) var(--spacing-sm)",
395
390
  "text-align": "left",
396
- "font-weight": "600",
397
391
  },
398
392
 
399
- "thead th, tbody th, tbody td, tfoot th, tfoot td": {
400
- "vertical-align": "top",
393
+ "th": {
394
+ "font-weight": "600",
401
395
  },
402
396
 
403
397
  "thead th": {
404
398
  "vertical-align": "bottom",
405
399
  },
406
400
 
401
+ "tbody th, tbody td": {
402
+ "vertical-align": "top",
403
+ },
404
+
405
+ "tfoot th, tfoot td": {
406
+ "vertical-align": "top",
407
+ },
408
+
407
409
  "tbody + tbody": {
408
410
  "border-top-width": "2px",
409
411
  },
@@ -439,23 +441,31 @@ export default {
439
441
  "line-height": "inherit",
440
442
  },
441
443
 
442
- // Resets
443
- "ul": {
444
- "margin-top": "0",
445
- "margin-bottom": "0",
446
- },
447
-
448
- ":where(p, pre):first-child": {
449
- "margin-top": "0",
450
- },
444
+ // Utilities - Margin Cleanup
445
+ ":where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, figure, table, pre):first-child":
446
+ {
447
+ "margin-top": "0",
448
+ },
451
449
 
452
- ":where(p, pre):last-child": {
450
+ ":where(p, ul, ol, dl, blockquote, figure, table, pre):last-child": {
453
451
  "margin-bottom": "0",
454
452
  },
455
453
 
454
+ // Print Styles
456
455
  "@media print": {
457
- "table": {
456
+ "body": {
457
+ "font-size": "12pt",
458
+ "line-height": "1.5",
459
+ "color": "#000",
460
+ },
461
+ ":where(h1, h2, h3, h4, h5, h6)": {
462
+ "break-after": "avoid",
463
+ },
464
+ ":where(img, figure, pre, table)": {
458
465
  "break-inside": "avoid",
459
466
  },
467
+ "a": {
468
+ "text-decoration": "underline",
469
+ },
460
470
  },
461
471
  };
package/src/index.js CHANGED
@@ -23,13 +23,8 @@ export default plugin.withOptions((options = {}) => {
23
23
  const includeBase = resolveBool(options.base, true); // Default: true
24
24
  const includeExtra = resolveBool(options.extra, false); // Default: false
25
25
 
26
- if (includeBase) {
27
- addBase(baseStyles);
28
- }
29
-
30
- if (includeExtra) {
31
- addBase(extraStyles);
32
- }
26
+ includeBase && addBase(baseStyles);
27
+ includeExtra && addBase(extraStyles);
33
28
 
34
29
  // 2. Parse themes configuration
35
30
  let configThemes = options.themes;
@@ -8,7 +8,7 @@ export default plugin.withOptions((options = {}) => {
8
8
  const isDefault = options.default ?? false;
9
9
  const isPrefersDark = options.prefersdark ?? false;
10
10
  const rootSelector = options.root ?? ":root";
11
- // Nowa opcja: color-scheme (defaults to 'light' if not specified)
11
+ // Defaults to light scheme if not specified
12
12
  const colorScheme = options["color-scheme"] ?? "light";
13
13
 
14
14
  if (!themeName) {