Remove CSS transition
This commit is contained in:
parent
d196d8ae32
commit
722359e702
2 changed files with 8 additions and 9 deletions
|
|
@ -185,7 +185,6 @@ svg
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
transition-duration: 0.3s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle:hover
|
.toggle:hover
|
||||||
|
|
|
||||||
16
src/main.jsx
16
src/main.jsx
|
|
@ -22,14 +22,14 @@ class MainComponent extends Component
|
||||||
componentDidMount()
|
componentDidMount()
|
||||||
{
|
{
|
||||||
// Smooth color transitions (after rendering to avoid flash on reload)
|
// Smooth color transitions (after rendering to avoid flash on reload)
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
const styleEl = document.head.getElementsByTagName('style')[0]
|
// const styleEl = document.head.getElementsByTagName('style')[0]
|
||||||
document.head.appendChild(styleEl)
|
// document.head.appendChild(styleEl)
|
||||||
const styleSheet = styleEl.sheet
|
// const styleSheet = styleEl.sheet
|
||||||
styleSheet.insertRule(
|
// styleSheet.insertRule(
|
||||||
'*, ::after, ::before { transition-property: background-color, color, fill; transition-duration: 1s;}')
|
// '*, ::after, ::before { transition-property: background-color, color, fill; transition-duration: 1s;}')
|
||||||
},
|
// },
|
||||||
500)
|
// 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleTheme(checked)
|
toggleTheme(checked)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue