vuestic-ui
vuestic-ui copied to clipboard
Fix/dark theme flashbang
closes https://github.com/epicmaxco/vuestic-ui/issues/2419
Optimized only for production. Idk how to fix this in SPA... We need to wait until all js loaded and parsed and then bg can be changed.
@m0ksem can you check this? https://caniuse.com/prefers-color-scheme
@m0ksem can you check this? https://caniuse.com/prefers-color-scheme
I could hardcode colors for docs, but it is not solution for vuestic-ui. User must hardcode it too.
Flash caused because body has white BG until we register CSS variables. Unfortunately, we need to wait for all components to be registered and then CSS variables can be rendered in DOM.
I thought about running CSS variables update before registering components. Registering components takes 90% of all rendering time.
Require https://github.com/epicmaxco/vuestic-ui/pull/2438 to be merged before.
Can't we just hack a small script into docs index.html
's head?
Can't we just hack a small script into docs
index.html
's head?
Might be fixable after https://github.com/epicmaxco/vuestic-ui/issues/2623
Hope to fix this in nuxt later.