@kwtv/tokens 0.6.0 → 0.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwtv/tokens",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "KWTV design tokens. Colour, type, space, shape and motion. Light and dark.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -15,6 +15,9 @@
15
15
  "files": [
16
16
  "tokens"
17
17
  ],
18
+ "sideEffects": [
19
+ "**/*.css"
20
+ ],
18
21
  "exports": {
19
22
  "./tokens.css": "./tokens/tokens.css",
20
23
  "./utilities.css": "./tokens/utilities.css",
package/tokens/tokens.css CHANGED
@@ -330,8 +330,8 @@
330
330
  /* Type family. Generic names on purpose, like every token here.
331
331
  They sit in a layer, so a host that uses the same names wins
332
332
  by declaring them unlayered. */
333
- --font-sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
334
- --font-serif: "Source Serif 4 Variable", "Source Serif 4", ui-serif, Georgia, serif;
333
+ --font-sans: "Hanken Grotesk", "Hanken Grotesk Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
334
+ --font-serif: "Source Serif 4 Variable", "Source Serif 4", "Source Serif 4 Fallback", ui-serif, Georgia, serif;
335
335
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
336
336
 
337
337
  /* Weight */
@@ -440,6 +440,27 @@
440
440
  --leading-7xl: 1.02;
441
441
  }
442
442
 
443
+ /* Fallbacks with the web fonts' metrics. Swapping fonts in
444
+ then moves no text. */
445
+ @font-face {
446
+ font-family: "Hanken Grotesk Fallback";
447
+ src: local("Arial");
448
+ size-adjust: 100.5%;
449
+ ascent-override: 99.5%;
450
+ descent-override: 30.15%;
451
+ line-gap-override: 0%;
452
+ unicode-range: U+0000-02BA, U+02BB-02BC, U+02BD-02C5, U+02C6, U+02C7-02CC, U+02CE-02D7, U+02DA, U+02DC, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2000-206F, U+2074, U+20A0-20AB, U+20AC, U+20AD-20C0, U+2113, U+2122, U+2191, U+2193, U+2212, U+2215, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD;
453
+ }
454
+ @font-face {
455
+ font-family: "Source Serif 4 Fallback";
456
+ src: local("Georgia");
457
+ size-adjust: 105.8%;
458
+ ascent-override: 97.92%;
459
+ descent-override: 31.66%;
460
+ line-gap-override: 0%;
461
+ unicode-range: U+0000-02BA, U+02BB-02BC, U+02BD-02C5, U+02C6, U+02C7-02CC, U+02CE-02D7, U+02DA, U+02DC, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2000-206F, U+2074, U+20A0-20AB, U+20AC, U+20AD-20C0, U+2113, U+2122, U+2191, U+2193, U+2212, U+2215, U+2C60-2C7F, U+A720-A7FF, U+FEFF, U+FFFD;
462
+ }
463
+
443
464
  /* Honour the OS setting. */
444
465
  @media (prefers-reduced-motion: reduce) {
445
466
  :root {
@@ -494,11 +494,11 @@
494
494
  "font": {
495
495
  "family": {
496
496
  "sans": {
497
- "$value": "\"Hanken Grotesk\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif",
497
+ "$value": "\"Hanken Grotesk\", \"Hanken Grotesk Fallback\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif",
498
498
  "$type": "fontFamily"
499
499
  },
500
500
  "serif": {
501
- "$value": "\"Source Serif 4 Variable\", \"Source Serif 4\", ui-serif, Georgia, serif",
501
+ "$value": "\"Source Serif 4 Variable\", \"Source Serif 4\", \"Source Serif 4 Fallback\", ui-serif, Georgia, serif",
502
502
  "$type": "fontFamily"
503
503
  },
504
504
  "mono": {
package/tokens/tokens.ts CHANGED
@@ -155,8 +155,8 @@ export const radius = {
155
155
  } as const;
156
156
 
157
157
  export const fontFamily = {
158
- "sans": "\"Hanken Grotesk\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif",
159
- "serif": "\"Source Serif 4 Variable\", \"Source Serif 4\", ui-serif, Georgia, serif",
158
+ "sans": "\"Hanken Grotesk\", \"Hanken Grotesk Fallback\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif",
159
+ "serif": "\"Source Serif 4 Variable\", \"Source Serif 4\", \"Source Serif 4 Fallback\", ui-serif, Georgia, serif",
160
160
  "mono": "\"JetBrains Mono Variable\", \"JetBrains Mono\", ui-monospace, \"SF Mono\", Menlo, monospace",
161
161
  } as const;
162
162