clampography 0.9.9 → 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.
- package/README.md +6 -4
- package/clampography.css +69 -57
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -15,10 +15,12 @@ on nearly all modern devices.
|
|
|
15
15
|
|
|
16
16
|
## The purpose
|
|
17
17
|
|
|
18
|
-
CSS resets
|
|
19
|
-
remove all
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
[CSS resets](https://en.wikipedia.org/wiki/Reset_style_sheet) like
|
|
19
|
+
[Tailwind's Preflight](https://tailwindcss.com/docs/preflight) remove all
|
|
20
|
+
browser typography defaults, leaving you with unstyled text. **Clampography**
|
|
21
|
+
delivers production-ready text scaling that responds to viewport changes
|
|
22
|
+
automatically, while leaving all aesthetic choices to you.
|
|
23
|
+
|
|
22
24
|
Visit the temporary [demo page](https://next.dav.one/clampography/) to see how
|
|
23
25
|
it looks.
|
|
24
26
|
|
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.
|
|
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 -
|
|
171
|
+
/* Definition term - semantic emphasis with italic */
|
|
168
172
|
dfn {
|
|
169
|
-
font-style:
|
|
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
|
-
/*
|
|
180
|
-
|
|
183
|
+
/* Keyboard input - typically user actions */
|
|
184
|
+
kbd {
|
|
181
185
|
font-family: var(--font-family-mono);
|
|
182
|
-
|
|
183
|
-
|
|
186
|
+
font-size: 0.875em;
|
|
187
|
+
font-weight: 600;
|
|
184
188
|
}
|
|
185
189
|
|
|
186
|
-
/*
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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:
|
|
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
|
|
294
|
-
li >
|
|
295
|
-
li >
|
|
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,12 +312,13 @@
|
|
|
306
312
|
content: '';
|
|
307
313
|
position: absolute;
|
|
308
314
|
left: -1.125em;
|
|
309
|
-
top: calc(
|
|
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;
|
|
313
321
|
border-radius: 50%;
|
|
314
|
-
opacity: 0.4;
|
|
315
322
|
}
|
|
316
323
|
|
|
317
324
|
/* Right-aligned numbers for professional look (e.g. "9." aligns with "10.") */
|
|
@@ -331,15 +338,7 @@
|
|
|
331
338
|
text-align: right;
|
|
332
339
|
font-weight: 600;
|
|
333
340
|
color: currentColor;
|
|
334
|
-
opacity: 0.6;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/* Nested lists - indentation only, spacing handled by li rules above */
|
|
338
|
-
:where(ul, ol) :where(ul, ol) {
|
|
339
|
-
margin-bottom: 0; /* Parent li spacing already handles this */
|
|
340
|
-
padding-left: var(--spacing-md);
|
|
341
341
|
}
|
|
342
|
-
|
|
343
342
|
/* --------------------------------------------------------------------------
|
|
344
343
|
DEFINITION LISTS - Glossaries & Key-Value Pairs
|
|
345
344
|
-------------------------------------------------------------------------- */
|
|
@@ -414,6 +413,13 @@
|
|
|
414
413
|
padding: 0 var(--spacing-xs);
|
|
415
414
|
}
|
|
416
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
|
+
|
|
417
423
|
/* Form output element - typically displays calculation results */
|
|
418
424
|
output {
|
|
419
425
|
display: inline-block;
|
|
@@ -426,13 +432,41 @@
|
|
|
426
432
|
vertical-align: middle;
|
|
427
433
|
}
|
|
428
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
|
+
|
|
429
462
|
/* --------------------------------------------------------------------------
|
|
430
463
|
MEDIA - Images, Videos, Figures
|
|
431
464
|
-------------------------------------------------------------------------- */
|
|
432
465
|
|
|
433
|
-
:where(img, video) {
|
|
466
|
+
:where(img, video, canvas, audio, iframe, svg) {
|
|
434
467
|
max-width: 100%;
|
|
435
468
|
height: auto;
|
|
469
|
+
vertical-align: middle;
|
|
436
470
|
}
|
|
437
471
|
|
|
438
472
|
figure {
|
|
@@ -455,7 +489,7 @@
|
|
|
455
489
|
margin-top: var(--spacing-md);
|
|
456
490
|
margin-bottom: var(--spacing-md);
|
|
457
491
|
border-collapse: collapse;
|
|
458
|
-
font-size:
|
|
492
|
+
font-size: 1em;
|
|
459
493
|
line-height: 1.6;
|
|
460
494
|
}
|
|
461
495
|
|
|
@@ -504,6 +538,7 @@
|
|
|
504
538
|
margin-top: var(--spacing-xl);
|
|
505
539
|
margin-bottom: var(--spacing-xl);
|
|
506
540
|
border: 0;
|
|
541
|
+
border-top: 1px solid;
|
|
507
542
|
}
|
|
508
543
|
|
|
509
544
|
/* --------------------------------------------------------------------------
|
|
@@ -537,35 +572,12 @@
|
|
|
537
572
|
UTILITIES - Margin Cleanup
|
|
538
573
|
-------------------------------------------------------------------------- */
|
|
539
574
|
|
|
540
|
-
:where(h1, h2, h3, h4, h5, h6, p, ul
|
|
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 {
|
|
541
577
|
margin-top: 0;
|
|
542
578
|
}
|
|
543
579
|
|
|
544
580
|
:where(p, ul, ol, dl, blockquote, figure, table, pre):last-child {
|
|
545
581
|
margin-bottom: 0;
|
|
546
582
|
}
|
|
547
|
-
|
|
548
|
-
/* --------------------------------------------------------------------------
|
|
549
|
-
PRINT STYLES - Optimized for Paper
|
|
550
|
-
-------------------------------------------------------------------------- */
|
|
551
|
-
|
|
552
|
-
@media print {
|
|
553
|
-
body {
|
|
554
|
-
font-size: 12pt;
|
|
555
|
-
line-height: 1.5;
|
|
556
|
-
color: #000;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
:where(h1, h2, h3, h4, h5, h6) {
|
|
560
|
-
break-after: avoid;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
:where(img, figure, pre, table) {
|
|
564
|
-
break-inside: avoid;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
a {
|
|
568
|
-
text-decoration: underline;
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
583
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clampography",
|
|
3
|
-
"version": "0.9.
|
|
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",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"alternative",
|
|
18
18
|
"blog",
|
|
19
19
|
"clamp",
|
|
20
|
+
"clampography",
|
|
20
21
|
"content",
|
|
21
22
|
"css",
|
|
22
23
|
"fluid",
|