clampography 0.9.0 → 0.9.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/README.md +4 -9
- package/clampography.css +5 -27
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -5,17 +5,12 @@
|
|
|
5
5
|
Instead of fixed sizes, it uses the CSS
|
|
6
6
|
[clamp()](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/clamp)
|
|
7
7
|
function to create fluid typography that adapts to any screen. With
|
|
8
|
-
[94
|
|
8
|
+
[94% global browser support](https://caniuse.com/css-math-functions), it works
|
|
9
9
|
on nearly all devices.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## Philosophy
|
|
16
|
-
|
|
17
|
-
**Clampography** is built on three core principles to match
|
|
18
|
-
`@tailwindcss/typography` quality standards while remaining pure CSS:
|
|
11
|
+
Built for [Tailwind v4's](https://tailwindcss.com/blog/tailwindcss-v4) CSS-first
|
|
12
|
+
architecture. Zero JavaScript configuration required. Best suited for blogs,
|
|
13
|
+
documentation, and content-heavy websites.
|
|
19
14
|
|
|
20
15
|
- **No default styling:** No colors, borders, transforms, or decorations.
|
|
21
16
|
- **Structure only:** Manages size, spacing, weight, and font-family.
|
package/clampography.css
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
@layer base {
|
|
2
|
-
/* ==========================================================================
|
|
3
|
-
|
|
4
|
-
CLAMPOGRAPHY
|
|
5
|
-
|
|
6
|
-
A fluid typography system matching @tailwindcss/typography standards.
|
|
7
|
-
|
|
8
|
-
PHILOSOPHY:
|
|
9
|
-
- No default styling (no colors, borders, transforms, decorations)
|
|
10
|
-
- Structure only: size, spacing, weight, font-family
|
|
11
|
-
- Contextual elements use 'em' (relative), blocks use 'clamp' (fluid)
|
|
12
|
-
|
|
13
|
-
========================================================================== */
|
|
14
|
-
|
|
15
2
|
/* --------------------------------------------------------------------------
|
|
16
3
|
ROOT CONFIGURATION
|
|
17
4
|
-------------------------------------------------------------------------- */
|
|
@@ -40,7 +27,6 @@
|
|
|
40
27
|
|
|
41
28
|
body {
|
|
42
29
|
font-family: var(--font-family-base);
|
|
43
|
-
/* Typography standard: 16px → 18px (not 14px) for optimal readability */
|
|
44
30
|
font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
|
|
45
31
|
line-height: 1.75;
|
|
46
32
|
|
|
@@ -58,21 +44,19 @@
|
|
|
58
44
|
-------------------------------------------------------------------------- */
|
|
59
45
|
|
|
60
46
|
:where(h1, h2, h3, h4, h5, h6) {
|
|
61
|
-
font-weight: 600;
|
|
47
|
+
font-weight: 600;
|
|
62
48
|
scroll-margin-top: var(--scroll-offset);
|
|
63
49
|
}
|
|
64
50
|
|
|
65
51
|
h1 {
|
|
66
|
-
/* Typography standard: 36px → 48px (matches prose-base → prose-lg) */
|
|
67
52
|
font-size: clamp(2.25rem, 1.95rem + 1.5vw, 3rem);
|
|
68
|
-
line-height: 1.1111;
|
|
69
|
-
font-weight: 800;
|
|
53
|
+
line-height: 1.1111;
|
|
54
|
+
font-weight: 800;
|
|
70
55
|
margin-top: 0;
|
|
71
56
|
margin-bottom: var(--spacing-xl);
|
|
72
57
|
}
|
|
73
58
|
|
|
74
59
|
h2 {
|
|
75
|
-
/* Typography standard: 24px → 30px */
|
|
76
60
|
font-size: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
|
|
77
61
|
line-height: 1.3333;
|
|
78
62
|
font-weight: 700;
|
|
@@ -81,7 +65,6 @@
|
|
|
81
65
|
}
|
|
82
66
|
|
|
83
67
|
h3 {
|
|
84
|
-
/* Typography standard: 20px → 24px */
|
|
85
68
|
font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
|
|
86
69
|
line-height: 1.6;
|
|
87
70
|
margin-top: var(--spacing-lg);
|
|
@@ -89,7 +72,6 @@
|
|
|
89
72
|
}
|
|
90
73
|
|
|
91
74
|
h4 {
|
|
92
|
-
/* Typography standard: stays at body size (16px → 18px) */
|
|
93
75
|
font-size: clamp(1rem, 0.975rem + 0.125vw, 1.125rem);
|
|
94
76
|
line-height: 1.5;
|
|
95
77
|
margin-top: var(--spacing-lg);
|
|
@@ -97,15 +79,14 @@
|
|
|
97
79
|
}
|
|
98
80
|
|
|
99
81
|
h5 {
|
|
100
|
-
|
|
101
|
-
font-size: 1rem; /* Fixed at body size, distinguished by weight */
|
|
82
|
+
font-size: 1rem;
|
|
102
83
|
line-height: 1.5;
|
|
103
84
|
margin-top: var(--spacing-md);
|
|
104
85
|
margin-bottom: var(--spacing-xs);
|
|
105
86
|
}
|
|
106
87
|
|
|
107
88
|
h6 {
|
|
108
|
-
font-size: 0.875rem;
|
|
89
|
+
font-size: 0.875rem;
|
|
109
90
|
line-height: 1.5;
|
|
110
91
|
margin-top: var(--spacing-md);
|
|
111
92
|
margin-bottom: var(--spacing-xs);
|
|
@@ -214,7 +195,6 @@
|
|
|
214
195
|
margin-top: var(--spacing-lg);
|
|
215
196
|
margin-bottom: var(--spacing-lg);
|
|
216
197
|
padding-left: var(--spacing-md);
|
|
217
|
-
/* No font-style - let users decide visual treatment */
|
|
218
198
|
}
|
|
219
199
|
|
|
220
200
|
/* Nested blockquotes - reduced spacing for hierarchy */
|
|
@@ -453,7 +433,6 @@
|
|
|
453
433
|
margin-top: var(--spacing-xl);
|
|
454
434
|
margin-bottom: var(--spacing-xl);
|
|
455
435
|
border: 0;
|
|
456
|
-
/* Border style moved to global.css */
|
|
457
436
|
}
|
|
458
437
|
|
|
459
438
|
/* --------------------------------------------------------------------------
|
|
@@ -475,7 +454,6 @@
|
|
|
475
454
|
margin-bottom: var(--spacing-xs);
|
|
476
455
|
}
|
|
477
456
|
|
|
478
|
-
/* Dialog element - semantic modal */
|
|
479
457
|
dialog {
|
|
480
458
|
font-size: inherit;
|
|
481
459
|
line-height: inherit;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clampography",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Fluid typography system based on CSS clamp() for Tailwind CSS v4",
|
|
5
5
|
"main": "clampography.css",
|
|
6
6
|
"style": "clampography.css",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"style",
|
|
22
22
|
"tailwind",
|
|
23
23
|
"tailwind-css",
|
|
24
|
+
"tailwind-plugin",
|
|
24
25
|
"tailwindcss",
|
|
25
26
|
"text",
|
|
26
27
|
"typography"
|