clampography 0.9.10 → 0.9.11

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.
Files changed (2) hide show
  1. package/clampography.css +69 -55
  2. package/package.json +1 -1
package/clampography.css CHANGED
@@ -66,7 +66,7 @@
66
66
 
67
67
  h3 {
68
68
  font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
69
- line-height: 1.6;
69
+ line-height: 1.5;
70
70
  margin-top: var(--spacing-lg);
71
71
  margin-bottom: var(--spacing-sm);
72
72
  }
@@ -92,6 +92,10 @@
92
92
  margin-bottom: var(--spacing-xs);
93
93
  }
94
94
 
95
+ :is(h1, h2, h3, h4, h5, h6):first-child {
96
+ margin-top: 0;
97
+ }
98
+
95
99
  /* --------------------------------------------------------------------------
96
100
  LINKS - Clickable Text (Structural Indicators)
97
101
  -------------------------------------------------------------------------- */
@@ -164,9 +168,9 @@
164
168
  font-style: italic;
165
169
  }
166
170
 
167
- /* Definition term - structural emphasis without forcing italic */
171
+ /* Definition term - semantic emphasis with italic */
168
172
  dfn {
169
- font-style: normal;
173
+ font-style: italic;
170
174
  font-weight: 600;
171
175
  }
172
176
 
@@ -176,17 +180,22 @@
176
180
  line-height: 1.5;
177
181
  }
178
182
 
179
- /* Code-related elements */
180
- :where(code, kbd, samp) {
183
+ /* Keyboard input - typically user actions */
184
+ kbd {
181
185
  font-family: var(--font-family-mono);
182
- padding: clamp(0.0625rem, 0.05rem + 0.0625vw, 0.125rem)
183
- clamp(0.1875rem, 0.15rem + 0.1875vw, 0.7125rem);
186
+ font-size: 0.875em;
187
+ font-weight: 600;
184
188
  }
185
189
 
186
- /* Inline code - minimal, scaled padding */
187
- :where(code:not(pre code), kbd, samp) {
188
- padding: clamp(0.0625rem, 0.05rem + 0.0625vw, 0.125rem)
189
- clamp(0.1875rem, 0.15rem + 0.1875vw, 0.3125rem);
190
+ /* Sample output - typically program/system output */
191
+ samp {
192
+ font-family: var(--font-family-mono);
193
+ font-size: 0.875em;
194
+ }
195
+
196
+ /* Data element - machine-readable values */
197
+ data {
198
+ font-variant-numeric: tabular-nums;
190
199
  }
191
200
 
192
201
  /* Superscript & subscript - essential for scientific notation */
@@ -235,7 +244,7 @@
235
244
 
236
245
  /* Address element */
237
246
  address {
238
- font-style: normal; /* Reset browser default italic */
247
+ font-style: italic;
239
248
  margin-top: var(--spacing-md);
240
249
  margin-bottom: var(--spacing-md);
241
250
  }
@@ -290,15 +299,12 @@
290
299
  margin-top: var(--spacing-xs);
291
300
  }
292
301
 
293
- /* Spacing before nested lists */
294
- li > :where(ul, ol),
295
- li > :where(ul, ol):first-child {
296
- margin-top: var(--spacing-xs);
297
- }
298
-
299
- /* Spacing before nested lists */
300
- li > :where(ul, ol) {
302
+ /* Spacing for nested lists - proper separation from parent text */
303
+ li > ul,
304
+ li > ol {
301
305
  margin-top: var(--spacing-xs);
306
+ margin-bottom: var(--spacing-sm);
307
+ padding-left: var(--spacing-md);
302
308
  }
303
309
 
304
310
  /* Perfectly centered dot relative to the first line of text */
@@ -306,7 +312,9 @@
306
312
  content: '';
307
313
  position: absolute;
308
314
  left: -1.125em;
309
- top: calc(0.875em - 0.1875em);
315
+ top: calc(
316
+ 0.875em - 0.1875em
317
+ ); /* Aligns with center of first line (assuming 1.5 line-height) */
310
318
  width: 0.375em;
311
319
  height: 0.375em;
312
320
  background-color: currentColor;
@@ -331,13 +339,6 @@
331
339
  font-weight: 600;
332
340
  color: currentColor;
333
341
  }
334
-
335
- /* Nested lists - indentation only, spacing handled by li rules above */
336
- :where(ul, ol) :where(ul, ol) {
337
- margin-bottom: 0; /* Parent li spacing already handles this */
338
- padding-left: var(--spacing-md);
339
- }
340
-
341
342
  /* --------------------------------------------------------------------------
342
343
  DEFINITION LISTS - Glossaries & Key-Value Pairs
343
344
  -------------------------------------------------------------------------- */
@@ -412,6 +413,13 @@
412
413
  padding: 0 var(--spacing-xs);
413
414
  }
414
415
 
416
+ /* Form labels - structural emphasis for accessibility */
417
+ label {
418
+ display: inline-block;
419
+ font-weight: 600;
420
+ margin-bottom: var(--spacing-xs);
421
+ }
422
+
415
423
  /* Form output element - typically displays calculation results */
416
424
  output {
417
425
  display: inline-block;
@@ -424,13 +432,41 @@
424
432
  vertical-align: middle;
425
433
  }
426
434
 
435
+ /* --------------------------------------------------------------------------
436
+ FORM CONTROLS - Typography Inheritance
437
+ -------------------------------------------------------------------------- */
438
+
439
+ input,
440
+ button,
441
+ textarea,
442
+ select,
443
+ optgroup {
444
+ font-family: inherit;
445
+ font-size: 100%;
446
+ line-height: inherit;
447
+ }
448
+
449
+ /* Textarea - proper line height for multi-line input */
450
+ textarea {
451
+ line-height: 1.5;
452
+ }
453
+
454
+ /* Button cursor - indicates interactivity */
455
+ button,
456
+ [type='button'],
457
+ [type='reset'],
458
+ [type='submit'] {
459
+ cursor: pointer;
460
+ }
461
+
427
462
  /* --------------------------------------------------------------------------
428
463
  MEDIA - Images, Videos, Figures
429
464
  -------------------------------------------------------------------------- */
430
465
 
431
- :where(img, video) {
466
+ :where(img, video, canvas, audio, iframe, svg) {
432
467
  max-width: 100%;
433
468
  height: auto;
469
+ vertical-align: middle;
434
470
  }
435
471
 
436
472
  figure {
@@ -453,7 +489,7 @@
453
489
  margin-top: var(--spacing-md);
454
490
  margin-bottom: var(--spacing-md);
455
491
  border-collapse: collapse;
456
- font-size: 0.9375em;
492
+ font-size: 1em;
457
493
  line-height: 1.6;
458
494
  }
459
495
 
@@ -502,6 +538,7 @@
502
538
  margin-top: var(--spacing-xl);
503
539
  margin-bottom: var(--spacing-xl);
504
540
  border: 0;
541
+ border-top: 1px solid;
505
542
  }
506
543
 
507
544
  /* --------------------------------------------------------------------------
@@ -535,35 +572,12 @@
535
572
  UTILITIES - Margin Cleanup
536
573
  -------------------------------------------------------------------------- */
537
574
 
538
- :where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, figure, table, pre):first-child {
575
+ :where(h1, h2, h3, h4, h5, h6, p, ul:not(li > ul, li > ol), ol:not(li > ul, li
576
+ > ol), dl, blockquote, figure, table, pre):first-child {
539
577
  margin-top: 0;
540
578
  }
541
579
 
542
580
  :where(p, ul, ol, dl, blockquote, figure, table, pre):last-child {
543
581
  margin-bottom: 0;
544
582
  }
545
-
546
- /* --------------------------------------------------------------------------
547
- PRINT STYLES - Optimized for Paper
548
- -------------------------------------------------------------------------- */
549
-
550
- @media print {
551
- body {
552
- font-size: 12pt;
553
- line-height: 1.5;
554
- color: #000;
555
- }
556
-
557
- :where(h1, h2, h3, h4, h5, h6) {
558
- break-after: avoid;
559
- }
560
-
561
- :where(img, figure, pre, table) {
562
- break-inside: avoid;
563
- }
564
-
565
- a {
566
- text-decoration: underline;
567
- }
568
- }
569
583
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clampography",
3
- "version": "0.9.10",
3
+ "version": "0.9.11",
4
4
  "description": "Fluid typography system based on CSS clamp(). Alternative to Tailwind CSS Typography plugin.",
5
5
  "main": "clampography.css",
6
6
  "style": "clampography.css",