@keboola/tailwind-config 0.7.0 → 0.8.0
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/index.js +32 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -174,6 +174,38 @@ const baseConfig = {
|
|
|
174
174
|
},
|
|
175
175
|
typography: typography,
|
|
176
176
|
colors,
|
|
177
|
+
// Brand-driven type scale — semantic `text-display` / `text-heading` /
|
|
178
|
+
// `text-body` utilities that bundle size + line-height + weight + tracking
|
|
179
|
+
// into one step. Each axis reads a `--type-*` var (emitted by ThemeProvider
|
|
180
|
+
// from `typography.typeScale`) with an inline fallback, so the utilities
|
|
181
|
+
// stay valid and unchanged until a brand opts in. Under `extend` so
|
|
182
|
+
// Tailwind's default `text-sm` / `text-xl` / … scale is preserved.
|
|
183
|
+
fontSize: {
|
|
184
|
+
display: [
|
|
185
|
+
'var(--type-display-size, 1.875rem)',
|
|
186
|
+
{
|
|
187
|
+
lineHeight: 'var(--type-display-leading, 1.2)',
|
|
188
|
+
fontWeight: 'var(--type-display-weight, 600)',
|
|
189
|
+
letterSpacing: 'var(--type-display-tracking, -0.02em)',
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
heading: [
|
|
193
|
+
'var(--type-heading-size, 1.25rem)',
|
|
194
|
+
{
|
|
195
|
+
lineHeight: 'var(--type-heading-leading, 1.4)',
|
|
196
|
+
fontWeight: 'var(--type-heading-weight, 600)',
|
|
197
|
+
letterSpacing: 'var(--type-heading-tracking, -0.01em)',
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
body: [
|
|
201
|
+
'var(--type-body-size, 0.875rem)',
|
|
202
|
+
{
|
|
203
|
+
lineHeight: 'var(--type-body-leading, 1.5)',
|
|
204
|
+
fontWeight: 'var(--type-body-weight, 400)',
|
|
205
|
+
letterSpacing: 'var(--type-body-tracking, normal)',
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
},
|
|
177
209
|
// Chrome tracking token — under `extend` so Tailwind's default tracking
|
|
178
210
|
// scale (`tracking-normal` / `tracking-wide` / …) is preserved. `chrome`
|
|
179
211
|
// reads `--letter-spacing-chrome` (from `typography.letterSpacing.chrome`),
|
package/package.json
CHANGED