diff --git a/composables/theme.js b/composables/theme.js index dfc6acc0ef..d0c94b4d24 100644 --- a/composables/theme.js +++ b/composables/theme.js @@ -48,7 +48,13 @@ export const updateTheme = (value, updatePreference = false) => { } if (process.client) { + const css = document.createElement('style') + css.appendChild(document.createTextNode('*,*::after,*::before{transition:none!important}')) + document.head.appendChild(css) + document.documentElement.className = `${theme.value.value}-mode` + + setTimeout(() => document.head.removeChild(css), 1) } themeCookie.value = theme.value