Browse Source

Merge pull request #84 from meriadec/master

Fix font-face
master
Loëck Vézien 7 years ago
committed by GitHub
parent
commit
94eee10604
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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`
${Object.keys(fonts)
.map(fontName => fonts[fontName].map(f => fontFace({ name: fontName, ...f })))
.join(`\n`)}
${transformFonts(fonts)};
* {
box-sizing: border-box;
@ -79,7 +86,7 @@ injectGlobal`
cursor: default;
font-family: "Museo Sans", "Open Sans", Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: 300,
font-weight: 300;
line-height: 1.5;
}

Loading…
Cancel
Save