Skip to content

Commit d55186a

Browse files
authored
fix: fix invalid font stacks (#8964)
**Related Issue:** #8963 ## Summary Generated font-stack values are now comma-delimited according to the [`font-family` spec](https://drafts.csswg.org/css-fonts/#font-family-prop): > Component values are a comma-separated list indicating alternatives.
1 parent b918782 commit d55186a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/calcite-design-tokens/support/tests/__snapshots__/index.spec.ts.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,10 @@ exports[`generated tokens CSS global should match 1`] = `
445445
--calcite-font-weight-regular: 400;
446446
--calcite-font-weight-normal: 400; /* For backwards compatibility only. This token will be removed from the published tokens in the next major in favor of the more descriptive word "regular" */
447447
--calcite-font-weight-light: 300; /* For Avenir Next World (secondary font family) */
448-
--calcite-font-family-code: Monaco Consolas "Andale Mono" "Lucida Console"
448+
--calcite-font-family-code: Monaco, Consolas, "Andale Mono", "Lucida Console",
449449
monospace; /* Font family for code with fallbacks */
450-
--calcite-font-family: "Avenir Next World" "Avenir Next LT Pro" Avenir
451-
"Helvetica Neue" sans-serif; /* Primary font with fallbacks */
450+
--calcite-font-family: "Avenir Next World", "Avenir Next LT Pro", Avenir,
451+
"Helvetica Neue", sans-serif; /* Primary font with fallbacks */
452452
--calcite-corner-radius-pill: 100%;
453453
--calcite-corner-radius-round: 4px;
454454
--calcite-corner-radius-sharp: 0;
@@ -2033,10 +2033,10 @@ $calcite-font-weight-medium: 500;
20332033
$calcite-font-weight-regular: 400;
20342034
$calcite-font-weight-normal: 400; // For backwards compatibility only. This token will be removed from the published tokens in the next major in favor of the more descriptive word "regular"
20352035
$calcite-font-weight-light: 300; // For Avenir Next World (secondary font family)
2036-
$calcite-font-family-code: Monaco Consolas "Andale Mono" "Lucida Console"
2036+
$calcite-font-family-code: Monaco, Consolas, "Andale Mono", "Lucida Console",
20372037
monospace; // Font family for code with fallbacks
2038-
$calcite-font-family: "Avenir Next World" "Avenir Next LT Pro" Avenir
2039-
"Helvetica Neue" sans-serif; // Primary font with fallbacks
2038+
$calcite-font-family: "Avenir Next World", "Avenir Next LT Pro", Avenir,
2039+
"Helvetica Neue", sans-serif; // Primary font with fallbacks
20402040
$calcite-corner-radius-pill: 100%;
20412041
$calcite-corner-radius-round: 4px;
20422042
$calcite-corner-radius-sharp: 0;

packages/calcite-design-tokens/support/token-transformer/styleDictionary/transformer/value/valueFontFamilyFallbacks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type FontFamilyFallbackToken = TransformedToken & { value: string[] };
1414
export const transformValuesFontFamilyWithFallbacks: CalledTransformerFunction<string> = (
1515
token: FontFamilyFallbackToken,
1616
) => {
17-
return token.value.join(" ");
17+
return token.value.join(",");
1818
};
1919

2020
export const registerValueFontFamilyWithFallbacks = (sd: StyleDictionary): void => {

0 commit comments

Comments
 (0)