-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: reduce font-faces to single SBB variant (#2618)
Closes #2614 BREAKING CHANGE: Replaced `Roman`, `Bold`, and `Light` font-face variants with the single `SBB` font. Using CSS `font-weight` property automatically selects the correct font family. Migration guide: - Replace `font-family: "SBBWeb Roman", ...` with `font-family: "SBB", ...` and use `font-weight: normal` (potentially not necessary as `normal` is the default). - Replace `font-family: "SBBWeb Bold", ...` with `font-family: "SBB", ...` and use `font-weight: bold` or CSS class `sbb-text--bold`. - Replace `font-family: "SBBWeb Light", ...` with `font-family: "SBB", ...` and use `font-weight: 300`. - Replace CSS variable `--sbb-typo-type-face-sbb-roman` with `--sbb-typo-font-family` and use `font-weight: normal` (potentially not necessary as `normal` is the default). - Replace CSS variable `--sbb-typo-type-face-sbb-bold` with `--sbb-typo-font-family` and use `font-weight: bold`. - Replace CSS variable `--sbb-typo-type-face-sbb-light` with `--sbb-typo-font-family` and use `font-weight: 300`.
- Loading branch information
1 parent
bbf1b3b
commit 679d9e9
Showing
17 changed files
with
96 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,57 @@ | ||
@mixin font-declarations { | ||
@font-face { | ||
font-family: 'SBBWeb Roman'; | ||
font-family: SBB; | ||
src: | ||
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Roman.woff2') format('woff2'), | ||
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Roman.woff') format('woff'); | ||
font-display: fallback; | ||
font-weight: 400; | ||
} | ||
|
||
@font-face { | ||
font-family: 'SBBWeb Bold'; | ||
font-family: SBB; | ||
src: | ||
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Bold.woff2') format('woff2'), | ||
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Bold.woff') format('woff'); | ||
font-display: swap; | ||
font-weight: 700; | ||
} | ||
|
||
@font-face { | ||
font-family: 'SBBWeb Light'; | ||
font-family: SBB; | ||
src: | ||
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Light.woff2') format('woff2'), | ||
url('https://cdn.app.sbb.ch/fonts/v1_6_subset/SBBWeb-Light.woff') format('woff'); | ||
font-display: swap; | ||
font-weight: 300; | ||
} | ||
} | ||
|
||
@mixin font-declarations-full { | ||
@font-face { | ||
font-family: 'SBBWeb Roman'; | ||
font-family: SBB; | ||
src: | ||
url('https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Roman.woff2') format('woff2'), | ||
url('https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Roman.woff') format('woff'); | ||
font-display: fallback; | ||
font-weight: 400; | ||
} | ||
|
||
@font-face { | ||
font-family: 'SBBWeb Bold'; | ||
font-family: SBB; | ||
src: | ||
url('https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Bold.woff2') format('woff2'), | ||
url('https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Bold.woff') format('woff'); | ||
font-display: swap; | ||
font-weight: 700; | ||
} | ||
|
||
@font-face { | ||
font-family: 'SBBWeb Light'; | ||
font-family: SBB; | ||
src: | ||
url('https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Light.woff2') format('woff2'), | ||
url('https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Light.woff') format('woff'); | ||
font-display: swap; | ||
font-weight: 300; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.