@womp/kookie-ui 0.3.26 → 0.4.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/AUTHORS +27 -0
- package/LICENSE +29 -0
- package/README.md +21 -1
- package/components.css +4 -4
- package/dist/cjs/components/_internal/shell-bottom.js +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
- package/dist/cjs/components/_internal/shell-inspector.js +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +3 -3
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +3 -3
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +3 -3
- package/dist/cjs/components/chatbar.js +2 -2
- package/dist/cjs/components/chatbar.js.map +3 -3
- package/dist/cjs/components/checkbox-cards.js +1 -1
- package/dist/cjs/components/checkbox-cards.js.map +3 -3
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +3 -3
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +3 -3
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +3 -3
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +3 -3
- package/dist/cjs/components/hover-card.js +1 -1
- package/dist/cjs/components/hover-card.js.map +3 -3
- package/dist/cjs/components/icon-button.js +2 -2
- package/dist/cjs/components/icon-button.js.map +3 -3
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +3 -3
- package/dist/cjs/components/radio-cards.js +1 -1
- package/dist/cjs/components/radio-cards.js.map +3 -3
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +3 -3
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +3 -3
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +3 -3
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/components/theme-panel.js +3 -3
- package/dist/cjs/components/theme-panel.js.map +3 -3
- package/dist/cjs/components/theme.d.ts +3 -0
- package/dist/cjs/components/theme.d.ts.map +1 -1
- package/dist/cjs/components/theme.js +1 -1
- package/dist/cjs/components/theme.js.map +3 -3
- package/dist/cjs/components/theme.props.d.ts +15 -1
- package/dist/cjs/components/theme.props.d.ts.map +1 -1
- package/dist/cjs/components/theme.props.js +1 -1
- package/dist/cjs/components/theme.props.js.map +2 -2
- package/dist/cjs/components/toggle-button.js +2 -2
- package/dist/cjs/components/toggle-button.js.map +3 -3
- package/dist/cjs/components/toggle-icon-button.js +3 -3
- package/dist/cjs/components/toggle-icon-button.js.map +3 -3
- package/dist/cjs/components/tooltip.js +1 -1
- package/dist/cjs/components/tooltip.js.map +3 -3
- package/dist/cjs/components/user-card.js +1 -1
- package/dist/cjs/components/user-card.js.map +3 -3
- package/dist/cjs/helpers/font-config.d.ts +84 -77
- package/dist/cjs/helpers/font-config.d.ts.map +1 -1
- package/dist/cjs/helpers/font-config.js +5 -2
- package/dist/cjs/helpers/font-config.js.map +3 -3
- package/dist/cjs/helpers/index.js +5 -2
- package/dist/cjs/helpers/index.js.map +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +2 -2
- package/dist/esm/{chunk-4CKDU6FY.js → chunk-2FYJTSOP.js} +2 -2
- package/dist/esm/{chunk-ICIGZ3N7.js → chunk-374ZYJUP.js} +2 -2
- package/dist/esm/{chunk-F2HYQ3ZR.js → chunk-6IGTK4JE.js} +2 -2
- package/dist/esm/chunk-6XGZPIUT.js +2 -0
- package/dist/esm/{chunk-T27QHMW7.js.map → chunk-6XGZPIUT.js.map} +2 -2
- package/dist/esm/{chunk-FLFAXVFB.js → chunk-A2RZGGMY.js} +2 -2
- package/dist/esm/{chunk-KKM6T5P7.js → chunk-AU3D6F42.js} +2 -2
- package/dist/esm/{chunk-O3CDWEZA.js → chunk-CVWCKOHO.js} +2 -2
- package/dist/esm/{chunk-JQQIPEGY.js → chunk-CWRNW44F.js} +2 -2
- package/dist/esm/{chunk-UVCH7QKO.js → chunk-DNHUQLXO.js} +2 -2
- package/dist/esm/{chunk-FOEZLQTW.js → chunk-FXUUI6Z2.js} +2 -2
- package/dist/esm/{chunk-WO43WW3A.js → chunk-IKSN4RNB.js} +2 -2
- package/dist/esm/{chunk-4IY2PR6N.js → chunk-K6QZMNCD.js} +2 -2
- package/dist/esm/{chunk-DL2O3GKG.js → chunk-KKBP2CRH.js} +2 -2
- package/dist/esm/{chunk-VLO7NXSP.js → chunk-M24UXMOQ.js} +2 -2
- package/dist/esm/{chunk-MRECKC4D.js → chunk-MK2R6DAU.js} +2 -2
- package/dist/esm/{chunk-5IBGFL6O.js → chunk-MOR3NSXQ.js} +2 -2
- package/dist/esm/{chunk-PQZXQ4ST.js → chunk-OSRJRBKP.js} +2 -2
- package/dist/esm/{chunk-WTYNFBFV.js → chunk-PLWXTEVE.js} +2 -2
- package/dist/esm/{chunk-U2X2CAW4.js → chunk-QEOAXJLN.js} +2 -2
- package/dist/esm/{chunk-36ZQVP7F.js → chunk-RMKXWYOV.js} +2 -2
- package/dist/esm/{chunk-BJYUPIXO.js → chunk-S56YSRHP.js} +2 -2
- package/dist/esm/{chunk-22HGLMPQ.js → chunk-TOLLPRMM.js} +2 -2
- package/dist/esm/{chunk-ETMLMDW4.js → chunk-UGD7Z3L4.js} +2 -2
- package/dist/esm/chunk-VA5A4MHU.js +6 -0
- package/dist/esm/chunk-VA5A4MHU.js.map +7 -0
- package/dist/esm/{chunk-4BBOHEF4.js → chunk-W7N7V5YD.js} +2 -2
- package/dist/esm/{chunk-D5N627TH.js → chunk-WFMYNZXZ.js} +2 -2
- package/dist/esm/{chunk-JR2YOGII.js → chunk-YEB3H7QN.js} +2 -2
- package/dist/esm/chunk-YUP6EICB.js +2 -0
- package/dist/esm/chunk-YUP6EICB.js.map +7 -0
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-cards.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/hover-card.js +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/radio-cards.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/theme.d.ts +3 -0
- package/dist/esm/components/theme.d.ts.map +1 -1
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/theme.props.d.ts +15 -1
- package/dist/esm/components/theme.props.d.ts.map +1 -1
- package/dist/esm/components/theme.props.js +1 -1
- package/dist/esm/components/toggle-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/user-card.js +1 -1
- package/dist/esm/helpers/font-config.d.ts +84 -77
- package/dist/esm/helpers/font-config.d.ts.map +1 -1
- package/dist/esm/helpers/font-config.js +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/fonts.css +8 -0
- package/package.json +17 -7
- package/src/components/heading.css +10 -3
- package/src/components/text.css +10 -3
- package/src/components/theme.props.tsx +13 -1
- package/src/components/theme.tsx +18 -0
- package/src/helpers/font-config.ts +130 -148
- package/src/styles/fonts.css +24 -29
- package/src/styles/index.css +0 -1
- package/src/styles/tokens/base.css +1 -0
- package/src/styles/tokens/font-family.css +263 -0
- package/src/styles/tokens/typography.css +2 -216
- package/styles.css +8607 -8616
- package/tokens/base.css +37 -27
- package/tokens.css +37 -27
- package/dist/esm/chunk-LOGJJF4I.js +0 -2
- package/dist/esm/chunk-LOGJJF4I.js.map +0 -7
- package/dist/esm/chunk-Q7P6BTVU.js +0 -3
- package/dist/esm/chunk-Q7P6BTVU.js.map +0 -7
- package/dist/esm/chunk-T27QHMW7.js +0 -2
- /package/dist/esm/{chunk-4CKDU6FY.js.map → chunk-2FYJTSOP.js.map} +0 -0
- /package/dist/esm/{chunk-ICIGZ3N7.js.map → chunk-374ZYJUP.js.map} +0 -0
- /package/dist/esm/{chunk-F2HYQ3ZR.js.map → chunk-6IGTK4JE.js.map} +0 -0
- /package/dist/esm/{chunk-FLFAXVFB.js.map → chunk-A2RZGGMY.js.map} +0 -0
- /package/dist/esm/{chunk-KKM6T5P7.js.map → chunk-AU3D6F42.js.map} +0 -0
- /package/dist/esm/{chunk-O3CDWEZA.js.map → chunk-CVWCKOHO.js.map} +0 -0
- /package/dist/esm/{chunk-JQQIPEGY.js.map → chunk-CWRNW44F.js.map} +0 -0
- /package/dist/esm/{chunk-UVCH7QKO.js.map → chunk-DNHUQLXO.js.map} +0 -0
- /package/dist/esm/{chunk-FOEZLQTW.js.map → chunk-FXUUI6Z2.js.map} +0 -0
- /package/dist/esm/{chunk-WO43WW3A.js.map → chunk-IKSN4RNB.js.map} +0 -0
- /package/dist/esm/{chunk-4IY2PR6N.js.map → chunk-K6QZMNCD.js.map} +0 -0
- /package/dist/esm/{chunk-DL2O3GKG.js.map → chunk-KKBP2CRH.js.map} +0 -0
- /package/dist/esm/{chunk-VLO7NXSP.js.map → chunk-M24UXMOQ.js.map} +0 -0
- /package/dist/esm/{chunk-MRECKC4D.js.map → chunk-MK2R6DAU.js.map} +0 -0
- /package/dist/esm/{chunk-5IBGFL6O.js.map → chunk-MOR3NSXQ.js.map} +0 -0
- /package/dist/esm/{chunk-PQZXQ4ST.js.map → chunk-OSRJRBKP.js.map} +0 -0
- /package/dist/esm/{chunk-WTYNFBFV.js.map → chunk-PLWXTEVE.js.map} +0 -0
- /package/dist/esm/{chunk-U2X2CAW4.js.map → chunk-QEOAXJLN.js.map} +0 -0
- /package/dist/esm/{chunk-36ZQVP7F.js.map → chunk-RMKXWYOV.js.map} +0 -0
- /package/dist/esm/{chunk-BJYUPIXO.js.map → chunk-S56YSRHP.js.map} +0 -0
- /package/dist/esm/{chunk-22HGLMPQ.js.map → chunk-TOLLPRMM.js.map} +0 -0
- /package/dist/esm/{chunk-ETMLMDW4.js.map → chunk-UGD7Z3L4.js.map} +0 -0
- /package/dist/esm/{chunk-4BBOHEF4.js.map → chunk-W7N7V5YD.js.map} +0 -0
- /package/dist/esm/{chunk-D5N627TH.js.map → chunk-WFMYNZXZ.js.map} +0 -0
- /package/dist/esm/{chunk-JR2YOGII.js.map → chunk-YEB3H7QN.js.map} +0 -0
|
@@ -1,194 +1,176 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Runtime font configuration for Kookie UI.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* and
|
|
4
|
+
* This is a thin, typed wrapper over the CSS tokens in `styles/tokens/font-family.css` —
|
|
5
|
+
* it writes the same variables you would write by hand, and nothing else. Prefer plain CSS
|
|
6
|
+
* where you can; reach for this when the stacks are only known at runtime (a theme editor,
|
|
7
|
+
* a user-selectable typeface).
|
|
8
|
+
*
|
|
9
|
+
* Two tiers, matching the CSS:
|
|
10
|
+
*
|
|
11
|
+
* - `stacks` — which typefaces exist: `sans`, `mono`, `serif`. Written to `:root`.
|
|
12
|
+
* - `roles` — which stack each role uses: `body`, `heading`, `code`, `strong`, `em`,
|
|
13
|
+
* `quote`. Written to the theme element, since roles are per-theme.
|
|
6
14
|
*/
|
|
7
15
|
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
export interface FontConfig {
|
|
12
|
-
/** Sans-serif font stack for fontFamily="sans" */
|
|
16
|
+
/** Tier 1 — the typefaces available to the theme. */
|
|
17
|
+
export interface FontStacks {
|
|
18
|
+
/** Sans-serif stack. Backs `font="sans"` and, by default, body text. */
|
|
13
19
|
sans?: string;
|
|
14
|
-
/** Monospace
|
|
20
|
+
/** Monospace stack. Backs `font="mono"` and `Code`. */
|
|
15
21
|
mono?: string;
|
|
16
|
-
/** Serif
|
|
22
|
+
/** Serif stack. Backs `font="serif"`, `Em` and `Quote`. */
|
|
17
23
|
serif?: string;
|
|
18
|
-
/** Base Inter font replacement */
|
|
19
|
-
inter?: string;
|
|
20
|
-
/** Base JetBrains Mono font replacement */
|
|
21
|
-
jetbrainsMono?: string;
|
|
22
|
-
/** Base Playfair Display font replacement */
|
|
23
|
-
playfairDisplay?: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
*/
|
|
29
|
-
|
|
26
|
+
/** Tier 2 — which stack each role of text uses. */
|
|
27
|
+
export interface FontRoles {
|
|
28
|
+
/** Body text: `Text`, inputs, buttons, and anything that does not opt out. */
|
|
29
|
+
body?: string;
|
|
30
|
+
/** `Heading`. Follows `body` when left unset. */
|
|
31
|
+
heading?: string;
|
|
32
|
+
/** `Code`. */
|
|
33
|
+
code?: string;
|
|
34
|
+
/** `Strong`. */
|
|
35
|
+
strong?: string;
|
|
36
|
+
/** `Em`. */
|
|
37
|
+
em?: string;
|
|
38
|
+
/** `Quote`. */
|
|
39
|
+
quote?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface FontConfig {
|
|
43
|
+
stacks?: FontStacks;
|
|
44
|
+
roles?: FontRoles;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** CSS custom properties backing each stack. Declared on `:root`. */
|
|
48
|
+
export const FONT_STACK_VARIABLES = {
|
|
30
49
|
sans: '--font-sans',
|
|
31
50
|
mono: '--font-mono',
|
|
32
51
|
serif: '--font-serif',
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
} as const satisfies Record<keyof FontStacks, `--font-${string}`>;
|
|
53
|
+
|
|
54
|
+
/** CSS custom properties backing each role. Declared on the theme element. */
|
|
55
|
+
export const FONT_ROLE_VARIABLES = {
|
|
56
|
+
body: '--font-body',
|
|
57
|
+
heading: '--font-heading',
|
|
58
|
+
code: '--font-code',
|
|
59
|
+
strong: '--font-strong',
|
|
60
|
+
em: '--font-em',
|
|
61
|
+
quote: '--font-quote',
|
|
62
|
+
} as const satisfies Record<keyof FontRoles, `--font-${string}`>;
|
|
41
63
|
|
|
42
64
|
/**
|
|
43
|
-
*
|
|
65
|
+
* Ready-made stacks, each ending in a system fallback.
|
|
66
|
+
*
|
|
67
|
+
* The webfont entries assume the face is already loaded — via
|
|
68
|
+
* `import '@womp/kookie-ui/fonts.css'`, `next/font`, or your own `@font-face`.
|
|
69
|
+
* Kookie's core stylesheet deliberately loads none.
|
|
44
70
|
*/
|
|
45
71
|
export const FONT_STACKS = {
|
|
46
|
-
// Sans
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
poppins: "'Poppins',
|
|
50
|
-
openSans: "'Open Sans
|
|
51
|
-
|
|
52
|
-
//
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
// Serif
|
|
59
|
-
|
|
60
|
-
|
|
72
|
+
// Sans
|
|
73
|
+
system: "-apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, 'Helvetica Neue', system-ui, sans-serif",
|
|
74
|
+
inter: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, system-ui, sans-serif",
|
|
75
|
+
poppins: "'Poppins', -apple-system, BlinkMacSystemFont, system-ui, sans-serif",
|
|
76
|
+
openSans: "'Open Sans (Custom)', -apple-system, BlinkMacSystemFont, system-ui, sans-serif",
|
|
77
|
+
|
|
78
|
+
// Mono
|
|
79
|
+
systemMono: "'Menlo', 'Consolas (Custom)', 'Bitstream Vera Sans Mono', monospace",
|
|
80
|
+
jetbrainsMono: "'JetBrains Mono', 'Menlo', 'Consolas (Custom)', monospace",
|
|
81
|
+
firaCode: "'Fira Code', 'Menlo', 'Consolas (Custom)', monospace",
|
|
82
|
+
sourceCodePro: "'Source Code Pro', 'Menlo', 'Consolas (Custom)', monospace",
|
|
83
|
+
|
|
84
|
+
// Serif
|
|
85
|
+
systemSerif: "'Times New Roman', 'Times', 'Georgia', 'Cambria', serif",
|
|
86
|
+
playfair: "'Playfair Display', 'Times New Roman', 'Georgia', serif",
|
|
61
87
|
georgia: "'Georgia', 'Times New Roman', 'Times', serif",
|
|
62
|
-
lora: "'Lora', 'Times New Roman',
|
|
88
|
+
lora: "'Lora', 'Georgia', 'Times New Roman', serif",
|
|
63
89
|
} as const;
|
|
64
90
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
* @param target Target element (defaults to document.documentElement)
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```ts
|
|
73
|
-
* // Use Google Fonts
|
|
74
|
-
* applyFontConfig({
|
|
75
|
-
* sans: FONT_STACKS.poppins,
|
|
76
|
-
* mono: FONT_STACKS.firaCode
|
|
77
|
-
* });
|
|
78
|
-
*
|
|
79
|
-
* // Use system fonts only
|
|
80
|
-
* applyFontConfig({
|
|
81
|
-
* sans: FONT_STACKS.system,
|
|
82
|
-
* mono: FONT_STACKS.systemMono
|
|
83
|
-
* });
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
export function applyFontConfig(config: FontConfig, target: HTMLElement = document.documentElement): void {
|
|
87
|
-
const style = target.style;
|
|
88
|
-
|
|
89
|
-
if (config.sans) {
|
|
90
|
-
style.setProperty(FONT_CSS_VARIABLES.sans, config.sans);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (config.mono) {
|
|
94
|
-
style.setProperty(FONT_CSS_VARIABLES.mono, config.mono);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (config.serif) {
|
|
98
|
-
style.setProperty(FONT_CSS_VARIABLES.serif, config.serif);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (config.inter) {
|
|
102
|
-
style.setProperty(FONT_CSS_VARIABLES.inter, config.inter);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (config.jetbrainsMono) {
|
|
106
|
-
style.setProperty(FONT_CSS_VARIABLES.jetbrainsMono, config.jetbrainsMono);
|
|
91
|
+
function write<K extends string>(target: HTMLElement, variables: Record<K, string>, values: Partial<Record<K, string>>) {
|
|
92
|
+
for (const key of Object.keys(variables) as K[]) {
|
|
93
|
+
const value = values[key];
|
|
94
|
+
if (value) target.style.setProperty(variables[key], value);
|
|
107
95
|
}
|
|
96
|
+
}
|
|
108
97
|
|
|
109
|
-
|
|
110
|
-
|
|
98
|
+
function clear(target: HTMLElement, variables: Record<string, string>) {
|
|
99
|
+
for (const variable of Object.values(variables)) {
|
|
100
|
+
target.style.removeProperty(variable);
|
|
111
101
|
}
|
|
112
102
|
}
|
|
113
103
|
|
|
114
104
|
/**
|
|
115
|
-
*
|
|
105
|
+
* Apply a font configuration.
|
|
116
106
|
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
107
|
+
* Stacks land on `:root` and roles on `themeElement`, mirroring where the stylesheet
|
|
108
|
+
* declares them — writing a role to `:root` would not survive, because the theme
|
|
109
|
+
* element declares its own.
|
|
119
110
|
*
|
|
120
111
|
* @example
|
|
121
112
|
* ```ts
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
113
|
+
* // Serif headings over a sans body
|
|
114
|
+
* applyFontConfig({
|
|
115
|
+
* stacks: { sans: FONT_STACKS.inter, serif: FONT_STACKS.playfair },
|
|
116
|
+
* roles: { heading: 'var(--font-serif)' },
|
|
125
117
|
* });
|
|
126
|
-
*
|
|
127
|
-
* // Inject into document
|
|
128
|
-
* const style = document.createElement('style');
|
|
129
|
-
* style.textContent = css;
|
|
130
|
-
* document.head.appendChild(style);
|
|
131
118
|
* ```
|
|
132
119
|
*/
|
|
133
|
-
export function
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (config.mono) {
|
|
141
|
-
rules.push(` ${FONT_CSS_VARIABLES.mono}: ${config.mono};`);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (config.serif) {
|
|
145
|
-
rules.push(` ${FONT_CSS_VARIABLES.serif}: ${config.serif};`);
|
|
146
|
-
}
|
|
120
|
+
export function applyFontConfig(
|
|
121
|
+
config: FontConfig,
|
|
122
|
+
{ root = document.documentElement, themeElement = document.querySelector<HTMLElement>('.radix-themes') }: { root?: HTMLElement; themeElement?: HTMLElement | null } = {},
|
|
123
|
+
): void {
|
|
124
|
+
if (config.stacks) write(root, FONT_STACK_VARIABLES, config.stacks);
|
|
125
|
+
if (config.roles && themeElement) write(themeElement, FONT_ROLE_VARIABLES, config.roles);
|
|
126
|
+
}
|
|
147
127
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Render a font configuration as a CSS string, for injecting into a stylesheet or
|
|
130
|
+
* emitting server-side.
|
|
131
|
+
*/
|
|
132
|
+
export function generateFontCSS(config: FontConfig): string {
|
|
133
|
+
const blocks: string[] = [];
|
|
151
134
|
|
|
152
|
-
|
|
153
|
-
|
|
135
|
+
const stacks = Object.entries(config.stacks ?? {}).filter(([, value]) => value);
|
|
136
|
+
if (stacks.length) {
|
|
137
|
+
blocks.push([':root {', ...stacks.map(([key, value]) => ` ${FONT_STACK_VARIABLES[key as keyof FontStacks]}: ${value};`), '}'].join('\n'));
|
|
154
138
|
}
|
|
155
139
|
|
|
156
|
-
|
|
157
|
-
|
|
140
|
+
const roles = Object.entries(config.roles ?? {}).filter(([, value]) => value);
|
|
141
|
+
if (roles.length) {
|
|
142
|
+
blocks.push(['.radix-themes {', ...roles.map(([key, value]) => ` ${FONT_ROLE_VARIABLES[key as keyof FontRoles]}: ${value};`), '}'].join('\n'));
|
|
158
143
|
}
|
|
159
144
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return rules.join('\n');
|
|
145
|
+
return blocks.join('\n\n');
|
|
163
146
|
}
|
|
164
147
|
|
|
165
|
-
/**
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
const style = target.style;
|
|
170
|
-
|
|
171
|
-
// Remove custom font variables to fall back to defaults
|
|
172
|
-
style.removeProperty(FONT_CSS_VARIABLES.sans);
|
|
173
|
-
style.removeProperty(FONT_CSS_VARIABLES.mono);
|
|
174
|
-
style.removeProperty(FONT_CSS_VARIABLES.serif);
|
|
175
|
-
style.removeProperty(FONT_CSS_VARIABLES.inter);
|
|
176
|
-
style.removeProperty(FONT_CSS_VARIABLES.jetbrainsMono);
|
|
177
|
-
style.removeProperty(FONT_CSS_VARIABLES.playfairDisplay);
|
|
148
|
+
/** Drop every inline font override, falling back to the stylesheet's defaults. */
|
|
149
|
+
export function resetFonts({ root = document.documentElement, themeElement = document.querySelector<HTMLElement>('.radix-themes') }: { root?: HTMLElement; themeElement?: HTMLElement | null } = {}): void {
|
|
150
|
+
clear(root, FONT_STACK_VARIABLES);
|
|
151
|
+
if (themeElement) clear(themeElement, FONT_ROLE_VARIABLES);
|
|
178
152
|
}
|
|
179
153
|
|
|
180
|
-
/**
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
const
|
|
154
|
+
/** Read the stacks and roles currently in effect. */
|
|
155
|
+
export function getCurrentFontConfig({ themeElement = document.querySelector<HTMLElement>('.radix-themes') }: { themeElement?: HTMLElement | null } = {}): Required<FontConfig> {
|
|
156
|
+
// Roles resolve against the theme element, so read both tiers from it — it inherits
|
|
157
|
+
// the stacks from `:root` and is the only place the roles are declared.
|
|
158
|
+
const computed = getComputedStyle(themeElement ?? document.documentElement);
|
|
159
|
+
const read = (variable: string) => computed.getPropertyValue(variable).trim() || undefined;
|
|
185
160
|
|
|
186
161
|
return {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
162
|
+
stacks: {
|
|
163
|
+
sans: read(FONT_STACK_VARIABLES.sans),
|
|
164
|
+
mono: read(FONT_STACK_VARIABLES.mono),
|
|
165
|
+
serif: read(FONT_STACK_VARIABLES.serif),
|
|
166
|
+
},
|
|
167
|
+
roles: {
|
|
168
|
+
body: read(FONT_ROLE_VARIABLES.body),
|
|
169
|
+
heading: read(FONT_ROLE_VARIABLES.heading),
|
|
170
|
+
code: read(FONT_ROLE_VARIABLES.code),
|
|
171
|
+
strong: read(FONT_ROLE_VARIABLES.strong),
|
|
172
|
+
em: read(FONT_ROLE_VARIABLES.em),
|
|
173
|
+
quote: read(FONT_ROLE_VARIABLES.quote),
|
|
174
|
+
},
|
|
193
175
|
};
|
|
194
176
|
}
|
package/src/styles/fonts.css
CHANGED
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
/***************************************************************************************************
|
|
2
|
+
* *
|
|
3
|
+
* KOOKIE UI WEBFONTS — OPT-IN *
|
|
4
|
+
* *
|
|
5
|
+
* Kookie UI's core stylesheet ships no webfonts; it defaults to system stacks so that importing *
|
|
6
|
+
* the library costs zero network requests. Import this file alongside it to get Kookie's own *
|
|
7
|
+
* typefaces: *
|
|
8
|
+
* *
|
|
9
|
+
* import '@womp/kookie-ui/styles.css'; *
|
|
10
|
+
* import '@womp/kookie-ui/fonts.css'; *
|
|
11
|
+
* *
|
|
12
|
+
* This costs three render-blocking requests to Google Fonts. If you already load fonts yourself *
|
|
13
|
+
* (`next/font`, a self-hosted @font-face, a CDN), skip this file and point the stacks at your *
|
|
14
|
+
* own faces instead: *
|
|
15
|
+
* *
|
|
16
|
+
* :root { *
|
|
17
|
+
* --font-sans: var(--my-next-font), system-ui, sans-serif; *
|
|
18
|
+
* } *
|
|
19
|
+
* *
|
|
20
|
+
***************************************************************************************************/
|
|
21
|
+
|
|
2
22
|
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap');
|
|
3
23
|
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
|
|
4
24
|
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
|
|
5
25
|
|
|
6
|
-
/* Font Variables - Customize these to change fonts throughout your app */
|
|
7
26
|
:root {
|
|
8
|
-
|
|
9
|
-
--font-
|
|
10
|
-
--font-
|
|
11
|
-
--font-playfair-display: 'Playfair Display', 'Times New Roman', 'Times', 'Georgia', 'Cambria', serif;
|
|
12
|
-
|
|
13
|
-
/* Theme font family overrides - change these to customize fonts globally */
|
|
14
|
-
--font-sans: var(--font-inter); /* Override this for custom sans-serif */
|
|
15
|
-
--font-mono: var(--font-jetbrains-mono); /* Override this for custom monospace */
|
|
16
|
-
--font-serif: var(--font-playfair-display); /* Override this for custom serif */
|
|
17
|
-
|
|
18
|
-
/* Force proper font weight rendering */
|
|
19
|
-
font-synthesis: none; /* Prevent browser from synthesizing weights */
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/* Radix Themes font weight enforcement */
|
|
23
|
-
.radix-themes {
|
|
24
|
-
font-synthesis: none;
|
|
25
|
-
font-family: var(--default-font-family);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/* System font fallback for critical loading scenarios */
|
|
29
|
-
@font-face {
|
|
30
|
-
font-family: 'System Fallback';
|
|
31
|
-
font-style: normal;
|
|
32
|
-
font-weight: 100 900;
|
|
33
|
-
font-display: block;
|
|
34
|
-
src: local('-apple-system'), local('BlinkMacSystemFont'), local('Segoe UI'), local('Roboto');
|
|
27
|
+
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, 'Helvetica Neue', system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
28
|
+
--font-mono: 'JetBrains Mono', 'Menlo', 'Consolas (Custom)', 'Liberation Mono', monospace, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
29
|
+
--font-serif: 'Playfair Display', 'Times New Roman', 'Times', 'Georgia', 'Cambria', serif;
|
|
35
30
|
}
|
package/src/styles/index.css
CHANGED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/***************************************************************************************************
|
|
2
|
+
* *
|
|
3
|
+
* TYPEFACES *
|
|
4
|
+
* *
|
|
5
|
+
* This file is the single owner of every font-family decision in Kookie UI. Sizes, weights, *
|
|
6
|
+
* line heights and letter spacing live in `typography.css`; nothing else declares a stack. *
|
|
7
|
+
* *
|
|
8
|
+
* There are exactly two tiers: *
|
|
9
|
+
* *
|
|
10
|
+
* 1. STACKS — which typefaces exist. Three of them: --font-sans, --font-mono, --font-serif. *
|
|
11
|
+
* Declared on `:root`, because a typeface is an app-wide resource (and because *
|
|
12
|
+
* that is where `next/font` and friends put theirs). Override at `:root`. *
|
|
13
|
+
* *
|
|
14
|
+
* 2. ROLES — which stack each piece of text uses: --font-body, --font-heading, --font-code, *
|
|
15
|
+
* --font-strong, --font-em, --font-quote. Declared on `.radix-themes`, because a *
|
|
16
|
+
* role is a per-theme decision that `<Theme fontFamily>` has to be able to switch *
|
|
17
|
+
* per subtree. Override at `.radix-themes`. *
|
|
18
|
+
* *
|
|
19
|
+
* No webfonts are loaded here. The defaults below are system stacks. To use Kookie's own *
|
|
20
|
+
* typefaces (Inter / JetBrains Mono / Playfair Display), additionally import *
|
|
21
|
+
* '@womp/kookie-ui/fonts.css'. *
|
|
22
|
+
* *
|
|
23
|
+
***************************************************************************************************/
|
|
24
|
+
|
|
25
|
+
:root {
|
|
26
|
+
/* Tier 1: stacks. Override these to change every typeface in the system. */
|
|
27
|
+
--font-sans:
|
|
28
|
+
-apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, 'Helvetica Neue', 'Open Sans (Custom)', system-ui, sans-serif, 'Apple Color Emoji',
|
|
29
|
+
'Segoe UI Emoji';
|
|
30
|
+
--font-mono: 'Menlo', 'Consolas (Custom)', 'Bitstream Vera Sans Mono', monospace, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
31
|
+
--font-serif: 'Times New Roman', 'Times', 'Georgia', 'Cambria', serif;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.radix-themes {
|
|
35
|
+
/* Tier 2: roles. Each one points at a stack. Override these to give a role its own typeface —
|
|
36
|
+
e.g. `--font-heading: var(--font-serif)` for serif headings over a sans body. */
|
|
37
|
+
--font-body: var(--font-sans);
|
|
38
|
+
--font-heading: var(--font-body); /* follows the body unless you say otherwise */
|
|
39
|
+
--font-code: var(--font-mono);
|
|
40
|
+
--font-strong: var(--font-body);
|
|
41
|
+
--font-em: var(--font-serif);
|
|
42
|
+
--font-quote: var(--font-serif);
|
|
43
|
+
|
|
44
|
+
/* Radix Themes names, kept as aliases of the roles above. Components read these, so overriding
|
|
45
|
+
either the Kookie role or the Radix name works — they are the same token, spelled twice. */
|
|
46
|
+
--default-font-family: var(--font-body);
|
|
47
|
+
--heading-font-family: var(--font-heading);
|
|
48
|
+
--code-font-family: var(--font-code);
|
|
49
|
+
--strong-font-family: var(--font-strong);
|
|
50
|
+
--em-font-family: var(--font-em);
|
|
51
|
+
--quote-font-family: var(--font-quote);
|
|
52
|
+
|
|
53
|
+
/* @deprecated Use --font-sans / --font-mono / --font-serif directly. */
|
|
54
|
+
--default-font-family-sans: var(--font-sans);
|
|
55
|
+
--default-font-family-mono: var(--font-mono);
|
|
56
|
+
--default-font-family-serif: var(--font-serif);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* `<Theme fontFamily>` — sets the body role only. Heading follows it through --font-heading's
|
|
60
|
+
default, so a `--font-heading` override of yours survives a theme font switch. */
|
|
61
|
+
[data-font-family='sans'] {
|
|
62
|
+
--font-body: var(--font-sans);
|
|
63
|
+
}
|
|
64
|
+
[data-font-family='mono'] {
|
|
65
|
+
--font-body: var(--font-mono);
|
|
66
|
+
}
|
|
67
|
+
[data-font-family='serif'] {
|
|
68
|
+
--font-body: var(--font-serif);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* `<Theme headingFontFamily>` — sets the heading role independently of the body. */
|
|
72
|
+
[data-heading-font-family='sans'] {
|
|
73
|
+
--font-heading: var(--font-sans);
|
|
74
|
+
}
|
|
75
|
+
[data-heading-font-family='mono'] {
|
|
76
|
+
--font-heading: var(--font-mono);
|
|
77
|
+
}
|
|
78
|
+
[data-heading-font-family='serif'] {
|
|
79
|
+
--font-heading: var(--font-serif);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/***************************************************************************************************
|
|
83
|
+
* *
|
|
84
|
+
* METRIC OVERRIDES *
|
|
85
|
+
* *
|
|
86
|
+
* Fallback faces normalised to match the primary stack's metrics, so swapping a webfont for a *
|
|
87
|
+
* system face does not reflow the page. Referenced by the default stacks above. *
|
|
88
|
+
* *
|
|
89
|
+
***************************************************************************************************/
|
|
90
|
+
|
|
91
|
+
@font-face {
|
|
92
|
+
font-family: 'Segoe UI (Custom)';
|
|
93
|
+
font-weight: 300;
|
|
94
|
+
size-adjust: 103%;
|
|
95
|
+
descent-override: 35%;
|
|
96
|
+
ascent-override: 105%;
|
|
97
|
+
src: local('Segoe UI Semilight'), local('Segoe UI');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@font-face {
|
|
101
|
+
font-family: 'Segoe UI (Custom)';
|
|
102
|
+
font-weight: 300;
|
|
103
|
+
font-style: italic;
|
|
104
|
+
size-adjust: 103%;
|
|
105
|
+
descent-override: 35%;
|
|
106
|
+
ascent-override: 105%;
|
|
107
|
+
src: local('Segoe UI Semilight Italic'), local('Segoe UI Italic');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@font-face {
|
|
111
|
+
font-family: 'Segoe UI (Custom)';
|
|
112
|
+
font-weight: 400;
|
|
113
|
+
size-adjust: 103%;
|
|
114
|
+
descent-override: 35%;
|
|
115
|
+
ascent-override: 105%;
|
|
116
|
+
src: local('Segoe UI');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@font-face {
|
|
120
|
+
font-family: 'Segoe UI (Custom)';
|
|
121
|
+
font-weight: 400;
|
|
122
|
+
font-style: italic;
|
|
123
|
+
size-adjust: 103%;
|
|
124
|
+
descent-override: 35%;
|
|
125
|
+
ascent-override: 105%;
|
|
126
|
+
src: local('Segoe UI Italic');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@font-face {
|
|
130
|
+
font-family: 'Segoe UI (Custom)';
|
|
131
|
+
font-weight: 500;
|
|
132
|
+
size-adjust: 103%;
|
|
133
|
+
descent-override: 35%;
|
|
134
|
+
ascent-override: 105%;
|
|
135
|
+
src: local('Segoe UI Semibold'), local('Segoe UI');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@font-face {
|
|
139
|
+
font-family: 'Segoe UI (Custom)';
|
|
140
|
+
font-weight: 500;
|
|
141
|
+
font-style: italic;
|
|
142
|
+
size-adjust: 103%;
|
|
143
|
+
descent-override: 35%;
|
|
144
|
+
ascent-override: 105%;
|
|
145
|
+
src: local('Segoe UI Semibold Italic'), local('Segoe UI Italic');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@font-face {
|
|
149
|
+
font-family: 'Segoe UI (Custom)';
|
|
150
|
+
font-weight: 700;
|
|
151
|
+
size-adjust: 103%;
|
|
152
|
+
descent-override: 35%;
|
|
153
|
+
ascent-override: 105%;
|
|
154
|
+
src: local('Segoe UI Bold');
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@font-face {
|
|
158
|
+
font-family: 'Segoe UI (Custom)';
|
|
159
|
+
font-weight: 700;
|
|
160
|
+
font-style: italic;
|
|
161
|
+
size-adjust: 103%;
|
|
162
|
+
descent-override: 35%;
|
|
163
|
+
ascent-override: 105%;
|
|
164
|
+
src: local('Segoe UI Bold Italic');
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@font-face {
|
|
168
|
+
font-family: 'Open Sans (Custom)';
|
|
169
|
+
font-weight: 300;
|
|
170
|
+
descent-override: 35%;
|
|
171
|
+
src: local('Open Sans Light'), local('Open Sans Regular');
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@font-face {
|
|
175
|
+
font-family: 'Open Sans (Custom)';
|
|
176
|
+
font-weight: 300;
|
|
177
|
+
font-style: italic;
|
|
178
|
+
descent-override: 35%;
|
|
179
|
+
src: local('Open Sans Light Italic'), local('Open Sans Italic');
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@font-face {
|
|
183
|
+
font-family: 'Open Sans (Custom)';
|
|
184
|
+
font-weight: 400;
|
|
185
|
+
descent-override: 35%;
|
|
186
|
+
src: local('Open Sans Regular');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@font-face {
|
|
190
|
+
font-family: 'Open Sans (Custom)';
|
|
191
|
+
font-weight: 400;
|
|
192
|
+
font-style: italic;
|
|
193
|
+
descent-override: 35%;
|
|
194
|
+
src: local('Open Sans Italic');
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@font-face {
|
|
198
|
+
font-family: 'Open Sans (Custom)';
|
|
199
|
+
font-weight: 500;
|
|
200
|
+
descent-override: 35%;
|
|
201
|
+
src: local('Open Sans Medium'), local('Open Sans Regular');
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@font-face {
|
|
205
|
+
font-family: 'Open Sans (Custom)';
|
|
206
|
+
font-weight: 500;
|
|
207
|
+
font-style: italic;
|
|
208
|
+
descent-override: 35%;
|
|
209
|
+
src: local('Open Sans Medium Italic'), local('Open Sans Italic');
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
@font-face {
|
|
213
|
+
font-family: 'Open Sans (Custom)';
|
|
214
|
+
font-weight: 700;
|
|
215
|
+
descent-override: 35%;
|
|
216
|
+
src: local('Open Sans Bold');
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@font-face {
|
|
220
|
+
font-family: 'Open Sans (Custom)';
|
|
221
|
+
font-weight: 700;
|
|
222
|
+
font-style: italic;
|
|
223
|
+
descent-override: 35%;
|
|
224
|
+
src: local('Open Sans Bold Italic');
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@font-face {
|
|
228
|
+
font-family: 'Consolas (Custom)';
|
|
229
|
+
font-weight: 400;
|
|
230
|
+
size-adjust: 110%;
|
|
231
|
+
ascent-override: 85%;
|
|
232
|
+
descent-override: 22%;
|
|
233
|
+
src: local('Consolas');
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@font-face {
|
|
237
|
+
font-family: 'Consolas (Custom)';
|
|
238
|
+
font-weight: 400;
|
|
239
|
+
font-style: italic;
|
|
240
|
+
size-adjust: 110%;
|
|
241
|
+
ascent-override: 85%;
|
|
242
|
+
descent-override: 22%;
|
|
243
|
+
src: local('Consolas Italic');
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@font-face {
|
|
247
|
+
font-family: 'Consolas (Custom)';
|
|
248
|
+
font-weight: 700;
|
|
249
|
+
size-adjust: 110%;
|
|
250
|
+
ascent-override: 85%;
|
|
251
|
+
descent-override: 22%;
|
|
252
|
+
src: local('Consolas Bold');
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@font-face {
|
|
256
|
+
font-family: 'Consolas (Custom)';
|
|
257
|
+
font-weight: 700;
|
|
258
|
+
font-style: italic;
|
|
259
|
+
size-adjust: 110%;
|
|
260
|
+
ascent-override: 85%;
|
|
261
|
+
descent-override: 22%;
|
|
262
|
+
src: local('Consolas Bold Italic');
|
|
263
|
+
}
|