From 94fb04beb2dd65732dfb9be98480f60a12d77483 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 13 Dec 2018 17:50:20 +0100 Subject: [PATCH] move font-face for roboto zero/mono to separate file --- src/support/styles/Fonts.js | 19 +++++++++++++++++++ src/support/styles/index.js | 24 ------------------------ 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/src/support/styles/Fonts.js b/src/support/styles/Fonts.js index c31cf5f5..cf2a96fd 100644 --- a/src/support/styles/Fonts.js +++ b/src/support/styles/Fonts.js @@ -28,7 +28,26 @@ import KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP from '../fonts/roboto/regular/KFOlCnqEu9 import KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP from '../fonts/roboto/regular/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2'; import KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ from '../fonts/roboto/regular/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2'; +import RobotoZero from '../fonts/roboto/RobotoZero.woff'; +import RobotoMono from '../fonts/roboto/RobotoMonoRegular.woff2'; + const fontStyles = css` + /* + custom Roboto with Zero without the thing inside, so it's more readable as number + since 0 doesn't look too similar to 8 + */ + + @font-face { + font-family: 'Roboto Zero'; + src: url(${RobotoZero}) format('woff'); + } + + @font-face { + font-family: 'Roboto Mono'; + font-style: normal; + src: url(${RobotoMono}) format('woff2'), /* Super Modern Browsers */ + } + /* cyrillic-ext */ @font-face { diff --git a/src/support/styles/index.js b/src/support/styles/index.js index 9395cb0e..9d78763c 100644 --- a/src/support/styles/index.js +++ b/src/support/styles/index.js @@ -47,30 +47,6 @@ const baseStyles = createGlobalStyle` height: 100%; } - /* - custom Roboto with Zero without the thing inside, so it's more readable as number - since 0 doesn't look too similar to 8 - */ - - @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/RobotoMonoRegular.eot') format('embedded-opentype'), /* IE9 Compat Modes */ - url('/fonts/roboto/RobotoMonoRegular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('/fonts/roboto/RobotoMonoRegular.woff2') format('woff2'), /* Super Modern Browsers */ - url('/fonts/roboto/RobotoMonoRegular.woff') format('woff'), /* Modern Browsers */ - url('/fonts/roboto/RobotoMonoRegular.ttf') format('truetype'), /* Safari, Android, iOS */ - url('/fonts/roboto/RobotoMonoRegular.svg#RobotoMono') format('svg'); /* Legacy iOS */ - } - ${fontStyles}; ${animationStyles}; ${tooltipStyles};