Browse Source

Fix font-face

master
meriadec 7 years ago
parent
commit
583f4b89cd
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 15
      src/styles/global.js

15
src/styles/global.js

@ -57,10 +57,17 @@ const fonts = {
], ],
} }
function transformFonts(allFonts) {
return Object.keys(allFonts)
.map(name => {
const fonts = allFonts[name]
return fonts.map(f => fontFace({ name, ...f })).join('\n')
})
.join('\n')
}
injectGlobal` injectGlobal`
${Object.keys(fonts) ${transformFonts(fonts)};
.map(fontName => fonts[fontName].map(f => fontFace({ name: fontName, ...f })))
.join(`\n`)}
* { * {
box-sizing: border-box; box-sizing: border-box;
@ -79,7 +86,7 @@ injectGlobal`
cursor: default; cursor: default;
font-family: "Museo Sans", "Open Sans", Arial, Helvetica, sans-serif; font-family: "Museo Sans", "Open Sans", Arial, Helvetica, sans-serif;
font-size: 16px; font-size: 16px;
font-weight: 300, font-weight: 300;
line-height: 1.5; line-height: 1.5;
} }

Loading…
Cancel
Save