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;
|
||||
padding: 4px;
|
||||
border-radius: 12px;
|
||||
transition-duration: 0.3s;
|
||||
}
|
||||
|
||||
.toggle:hover
|
||||
|
|
|
|||
16
src/main.jsx
16
src/main.jsx
|
|
@ -22,14 +22,14 @@ class MainComponent extends Component
|
|||
componentDidMount()
|
||||
{
|
||||
// Smooth color transitions (after rendering to avoid flash on reload)
|
||||
setTimeout(() => {
|
||||
const styleEl = document.head.getElementsByTagName('style')[0]
|
||||
document.head.appendChild(styleEl)
|
||||
const styleSheet = styleEl.sheet
|
||||
styleSheet.insertRule(
|
||||
'*, ::after, ::before { transition-property: background-color, color, fill; transition-duration: 1s;}')
|
||||
},
|
||||
500)
|
||||
// setTimeout(() => {
|
||||
// const styleEl = document.head.getElementsByTagName('style')[0]
|
||||
// document.head.appendChild(styleEl)
|
||||
// const styleSheet = styleEl.sheet
|
||||
// styleSheet.insertRule(
|
||||
// '*, ::after, ::before { transition-property: background-color, color, fill; transition-duration: 1s;}')
|
||||
// },
|
||||
// 500)
|
||||
}
|
||||
|
||||
toggleTheme(checked)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue