From 063f76b5b16e31b53e2100643831aa6ae0d71056 Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Fri, 10 Aug 2018 18:42:58 +0200 Subject: [PATCH] Base font for styled components --- src/js/support/BaseStyles.js | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/js/support/BaseStyles.js b/src/js/support/BaseStyles.js index 280e56be..334d375b 100644 --- a/src/js/support/BaseStyles.js +++ b/src/js/support/BaseStyles.js @@ -5,6 +5,15 @@ import normalize from 'styled-normalize'; const baseStyles = () => injectGlobal` ${normalize}; + html, body { + width: 100%; + height: 100%; + position: relative; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif; + font-weight: 400; + font-size: 14px; + } + * , *:before , *:after { box-sizing: border-box; } @@ -31,6 +40,26 @@ const baseStyles = () => injectGlobal` textarea:focus { outline: 0; } + + @font-face { + font-family: 'Roboto Zero'; + src: url('../fonts/roboto/RobotoZero.eot') format('embedded-opentype'), + url('../fonts/roboto/RobotoZero.eot?#iefix') format('embedded-opentype'), + url('../fonts/roboto/RobotoZero.woff') format('woff'), + url('../fonts/roboto/RobotoZero.ttf') format('truetype'); + } + + @font-face { + font-family: 'Roboto Mono'; + font-style: normal; + src: url('../fonts/roboto/roboto-mono-v4-greek_cyrillic-ext_greek-ext_latin_cyrillic_vietnamese_latin-ext-regular.eot') format('embedded-opentype'), /* IE9 Compat Modes */ + url('../fonts/roboto/roboto-mono-v4-greek_cyrillic-ext_greek-ext_latin_cyrillic_vietnamese_latin-ext-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../fonts/roboto/roboto-mono-v4-greek_cyrillic-ext_greek-ext_latin_cyrillic_vietnamese_latin-ext-regular.woff2') format('woff2'), /* Super Modern Browsers */ + url('../fonts/roboto/roboto-mono-v4-greek_cyrillic-ext_greek-ext_latin_cyrillic_vietnamese_latin-ext-regular.woff') format('woff'), /* Modern Browsers */ + url('../fonts/roboto/roboto-mono-v4-greek_cyrillic-ext_greek-ext_latin_cyrillic_vietnamese_latin-ext-regular.ttf') format('truetype'), /* Safari, Android, iOS */ + url('../fonts/roboto/roboto-mono-v4-greek_cyrillic-ext_greek-ext_latin_cyrillic_vietnamese_latin-ext-regular.svg#RobotoMono') format('svg'); /* Legacy iOS */ + } + `; -export default baseStyles; +export default baseStyles; \ No newline at end of file