Skip to content

Commit

Permalink
fix: fix invalid font stacks (#8964)
Browse files Browse the repository at this point in the history
**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.
  • Loading branch information
jcfranco committed Mar 19, 2024
1 parent b918782 commit d55186a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -445,10 +445,10 @@ exports[`generated tokens CSS global should match 1`] = `
--calcite-font-weight-regular: 400;
--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" */
--calcite-font-weight-light: 300; /* For Avenir Next World (secondary font family) */
--calcite-font-family-code: Monaco Consolas "Andale Mono" "Lucida Console"
--calcite-font-family-code: Monaco, Consolas, "Andale Mono", "Lucida Console",
monospace; /* Font family for code with fallbacks */
--calcite-font-family: "Avenir Next World" "Avenir Next LT Pro" Avenir
"Helvetica Neue" sans-serif; /* Primary font with fallbacks */
--calcite-font-family: "Avenir Next World", "Avenir Next LT Pro", Avenir,
"Helvetica Neue", sans-serif; /* Primary font with fallbacks */
--calcite-corner-radius-pill: 100%;
--calcite-corner-radius-round: 4px;
--calcite-corner-radius-sharp: 0;
Expand Down Expand Up @@ -2033,10 +2033,10 @@ $calcite-font-weight-medium: 500;
$calcite-font-weight-regular: 400;
$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"
$calcite-font-weight-light: 300; // For Avenir Next World (secondary font family)
$calcite-font-family-code: Monaco Consolas "Andale Mono" "Lucida Console"
$calcite-font-family-code: Monaco, Consolas, "Andale Mono", "Lucida Console",
monospace; // Font family for code with fallbacks
$calcite-font-family: "Avenir Next World" "Avenir Next LT Pro" Avenir
"Helvetica Neue" sans-serif; // Primary font with fallbacks
$calcite-font-family: "Avenir Next World", "Avenir Next LT Pro", Avenir,
"Helvetica Neue", sans-serif; // Primary font with fallbacks
$calcite-corner-radius-pill: 100%;
$calcite-corner-radius-round: 4px;
$calcite-corner-radius-sharp: 0;
Expand Down
Expand Up @@ -14,7 +14,7 @@ type FontFamilyFallbackToken = TransformedToken & { value: string[] };
export const transformValuesFontFamilyWithFallbacks: CalledTransformerFunction<string> = (
token: FontFamilyFallbackToken,
) => {
return token.value.join(" ");
return token.value.join(",");
};

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

0 comments on commit d55186a

Please sign in to comment.