@classic-homes/theme-tailwind-preset 0.12.0 → 0.13.2
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 +1 -1
- package/theme.js +13 -3
package/package.json
CHANGED
package/theme.js
CHANGED
|
@@ -14,12 +14,12 @@ const tokens = require('@classic-homes/theme-tokens');
|
|
|
14
14
|
const darkMode = ['class'];
|
|
15
15
|
|
|
16
16
|
// Heading sizes for the typography scale (mirrors theme-styles base.css).
|
|
17
|
-
// h1
|
|
17
|
+
// h1 is `font-serif` (Spectral 400 upright, v2.5); h2-h6 are Figtree 600.
|
|
18
18
|
// Exposed as `text-h1`..`text-h6` and emitted on the bare elements by
|
|
19
19
|
// `headingBase` below, so the two never drift.
|
|
20
20
|
const headingScale = {
|
|
21
21
|
// 2.75rem leading: a 2rem line on 40px type made wrapped titles overlap
|
|
22
|
-
h1: ['2.5rem', { lineHeight: '2.75rem', fontWeight: '
|
|
22
|
+
h1: ['2.5rem', { lineHeight: '2.75rem', fontWeight: '400' }], // 40px
|
|
23
23
|
h2: ['1.75rem', { lineHeight: '2.25rem', fontWeight: '600' }], // 28px
|
|
24
24
|
h3: ['1.5rem', { lineHeight: '2rem', fontWeight: '600' }], // 24px
|
|
25
25
|
h4: ['1.25rem', { lineHeight: '1.75rem', fontWeight: '600' }], // 20px
|
|
@@ -51,7 +51,7 @@ const headingStyles = Object.fromEntries(
|
|
|
51
51
|
level === 'h1'
|
|
52
52
|
? {
|
|
53
53
|
fontFamily: `var(--font-serif, ${stack(tokens.fontFamily.serif)})`,
|
|
54
|
-
fontStyle: '
|
|
54
|
+
fontStyle: 'normal',
|
|
55
55
|
fontSize,
|
|
56
56
|
lineHeight,
|
|
57
57
|
fontWeight,
|
|
@@ -70,9 +70,19 @@ const headingStyles = Object.fromEntries(
|
|
|
70
70
|
* - fieldset defaults to `min-inline-size: min-content`, so a fieldset holding a wide row
|
|
71
71
|
* (columns editor, radio grid) refuses to shrink and pushes the page sideways on phones.
|
|
72
72
|
* - <summary> toggles get vertical padding on coarse pointers.
|
|
73
|
+
* - Body links (a bare <a> with no class, from markdown or hand-written copy)
|
|
74
|
+
* are Heritage Teal and underlined (Color Reference v2.5: links are never
|
|
75
|
+
* shown by colour alone). base.css says the same inside its layer, but
|
|
76
|
+
* preflight's unlayered `a { color: inherit; text-decoration: inherit }`
|
|
77
|
+
* outranks it, as with headings. Styled links (with a class) keep inheriting.
|
|
73
78
|
*/
|
|
74
79
|
const responsiveBaseStyles = {
|
|
75
80
|
fieldset: { minWidth: '0' },
|
|
81
|
+
'a:not([class])': {
|
|
82
|
+
color: 'hsl(var(--link))',
|
|
83
|
+
textDecorationLine: 'underline',
|
|
84
|
+
textUnderlineOffset: '4px',
|
|
85
|
+
},
|
|
76
86
|
// <details> toggles are usually one text line (16–20px); on touch give them a
|
|
77
87
|
// 36px+ row. Padding utilities on the summary still win (utilities layer).
|
|
78
88
|
'@media (pointer: coarse)': { summary: { paddingTop: '0.5rem', paddingBottom: '0.5rem' } },
|