Remove CSS transition

This commit is contained in:
Corentin 2021-04-02 15:44:56 +09:00
commit 722359e702
2 changed files with 8 additions and 9 deletions

View file

@ -185,7 +185,6 @@ svg
cursor: pointer;
padding: 4px;
border-radius: 12px;
transition-duration: 0.3s;
}
.toggle:hover

View file

@ -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)