diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-10-27 03:47:24 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-10-27 03:47:24 +0800 |
commit | 9be4c4749935a765cbd55783735d1d1f719322c0 (patch) | |
tree | 49c3f3f42e58b49547799e6dfadc1b10c82381db /packages/instant/src/style | |
parent | 9512978de9aee1953930d4f16a105ec5ef7f048e (diff) | |
parent | af91a56a5594d07d7da6caaeff79f5a7fb31ff98 (diff) | |
download | dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar.gz dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar.bz2 dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar.lz dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar.xz dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.tar.zst dexon-sol-tools-9be4c4749935a765cbd55783735d1d1f719322c0.zip |
Merge branch 'development' into feature/not-enough-eth
Diffstat (limited to 'packages/instant/src/style')
-rw-r--r-- | packages/instant/src/style/fonts.ts | 10 | ||||
-rw-r--r-- | packages/instant/src/style/theme.ts | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/packages/instant/src/style/fonts.ts b/packages/instant/src/style/fonts.ts index 975a30a61..92450502d 100644 --- a/packages/instant/src/style/fonts.ts +++ b/packages/instant/src/style/fonts.ts @@ -1,10 +1,10 @@ -import { injectGlobal } from './theme'; - export const fonts = { include: () => { // Inject the inter-ui font into the page - return injectGlobal` - @import url('https://rsms.me/inter/inter-ui.css'); - `; + const appendTo = document.head || document.getElementsByTagName('head')[0] || document.body; + const style = document.createElement('style'); + style.type = 'text/css'; + style.appendChild(document.createTextNode(`@import url('https://rsms.me/inter/inter-ui.css')`)); + appendTo.appendChild(style); }, }; diff --git a/packages/instant/src/style/theme.ts b/packages/instant/src/style/theme.ts index d26c816c1..6575ff9f4 100644 --- a/packages/instant/src/style/theme.ts +++ b/packages/instant/src/style/theme.ts @@ -1,6 +1,6 @@ import * as styledComponents from 'styled-components'; -const { default: styled, css, injectGlobal, keyframes, ThemeProvider } = styledComponents; +const { default: styled, css, keyframes, ThemeProvider } = styledComponents; export type Theme = { [key in ColorOption]: string }; @@ -28,4 +28,6 @@ export const theme: Theme = { darkOrange: '#F2994C', }; -export { styled, css, injectGlobal, keyframes, ThemeProvider }; +export const transparentWhite = 'rgba(255,255,255,0.3)'; + +export { styled, css, keyframes, ThemeProvider }; |