Skip to content

Commit

Permalink
fix: wrong font weight on work sans variable font (#2170)
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-mesnil authored Aug 3, 2023
1 parent 42ebcfb commit f8d7748
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/components/GlobalStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const GlobalStyle = createGlobalStyle`
padding: 0 sm;
${defaultFieldStyles({})};
cursor: text;
font-family: 'Work Sans';
font-family: 'work-sans';
&:hover, &:active, &:focus {
box-shadow: none;
Expand Down
2 changes: 1 addition & 1 deletion packages/Core/src/theme/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import { getPaginations } from './paginations'
import { getTabs } from './tabs'
import { getBadges } from './badges'

const DEFAULT_FONT_FAMILY = 'Work Sans'
const DEFAULT_FONT_FAMILY = 'work-sans'
const DEFAULT_FONT_SIZE = 16
const DEFAULT_LETTER_SPACING = '-0.019rem'
const DEFAULT_LINE_HEIGHT = 1.15
Expand Down
7 changes: 3 additions & 4 deletions packages/Core/src/theme/fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type FontFace = {
export type ThemeFontFaces = {
'welcome-font': FontFace[]
'welcome-icon-font': FontFace[]
'Work Sans': FontFace[]
'work-sans': FontFace[]
}

export const fontFaces = (theme: WuiTheme): ThemeFontFaces => ({
Expand Down Expand Up @@ -52,13 +52,12 @@ export const fontFaces = (theme: WuiTheme): ThemeFontFaces => ({
display: 'block',
},
],
'Work Sans': [
'work-sans': [
{
url: `${theme.fontsUrl}/work-sans-variable`,
isVariable: true,
stretch: '75% 125%',
style: 'oblique 0deg 20deg',
weight: '400 500 600',
weight: '100 1000',
},
],
})

0 comments on commit f8d7748

Please sign in to comment.