Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
ea015d16
Unverified
Commit
ea015d16
authored
May 11, 2020
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop reloading fonts when light mode/dark mode switch
parent
d40d81ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
17 deletions
+25
-17
index.tsx
src/index.tsx
+17
-14
index.tsx
src/theme/index.tsx
+8
-3
No files found.
src/index.tsx
View file @
ea015d16
...
...
@@ -11,7 +11,7 @@ import ApplicationContextProvider, { Updater as ApplicationContextUpdater } from
import
TransactionContextProvider
,
{
Updater
as
TransactionContextUpdater
}
from
'
./contexts/Transactions
'
import
BalancesContextProvider
,
{
Updater
as
BalancesContextUpdater
}
from
'
./contexts/Balances
'
import
App
from
'
./pages/App
'
import
ThemeProvider
,
{
GlobalStyle
}
from
'
./theme
'
import
ThemeProvider
,
{
FixedGlobalStyle
,
Themed
GlobalStyle
}
from
'
./theme
'
import
'
./i18n
'
const
Web3ProviderNetwork
=
createWeb3ReactRoot
(
NetworkContextName
)
...
...
@@ -57,18 +57,21 @@ function Updaters() {
}
ReactDOM
.
render
(
<
Web3ReactProvider
getLibrary=
{
getLibrary
}
>
<
Web3ProviderNetwork
getLibrary=
{
getLibrary
}
>
<
ContextProviders
>
<
Updaters
/>
<
ThemeProvider
>
<>
<
GlobalStyle
/>
<
App
/>
</>
</
ThemeProvider
>
</
ContextProviders
>
</
Web3ProviderNetwork
>
</
Web3ReactProvider
>,
<>
<
FixedGlobalStyle
/>
<
Web3ReactProvider
getLibrary=
{
getLibrary
}
>
<
Web3ProviderNetwork
getLibrary=
{
getLibrary
}
>
<
ContextProviders
>
<
Updaters
/>
<
ThemeProvider
>
<>
<
ThemedGlobalStyle
/>
<
App
/>
</>
</
ThemeProvider
>
</
ContextProviders
>
</
Web3ProviderNetwork
>
</
Web3ReactProvider
>
</>,
document
.
getElementById
(
'
root
'
)
)
src/theme/index.tsx
View file @
ea015d16
...
...
@@ -178,7 +178,7 @@ export const TYPE = {
}
}
export
const
GlobalStyle
=
createGlobalStyle
`
export
const
Fixed
GlobalStyle
=
createGlobalStyle
`
@import url('https://rsms.me/inter/inter.css');
html { font-family: 'Inter', sans-serif; letter-spacing: -0.018em;}
@supports (font-variation-settings: normal) {
...
...
@@ -203,10 +203,15 @@ body > div {
html {
font-size: 16px;
font-variant: none;
color:
${({
theme
})
=>
theme
.
text1
}
;
background-color:
${({
theme
})
=>
theme
.
bg2
}
;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
`
export
const
ThemedGlobalStyle
=
createGlobalStyle
`
html {
color:
${({
theme
})
=>
theme
.
text1
}
;
background-color:
${({
theme
})
=>
theme
.
bg2
}
;
}
`
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment