-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
theme: fix flash on non-default variant #757
Comments
As of now and with the latest available source code this effect is still visible. file: layouts\partials\header.html
This is no generic solution as the color codes are hard coded... |
Because of the generator integration it is far more difficult and the reason why I layed off the fix initially. |
Another, more generic way, to solve this is to rewrite some of the partial logic. Instead of storing each variant in its own CSS file in the resulting page, we could put them all together into one CSS and prefix each with a distinct class on the body element See: https://alexandersandberg.com/articles/creating-a-website-theme-switcher-with-css-only/ The vaiant switch would only set the class on the body element, the rest is automatic. As all colors are already loaded, switch the colors should be much faster. |
Note for myself: The above works. The idea is to change the code as follows:
By that, the variant switch will only need to set the class on the Care must be taken for the This may also require the variant stylesheets to move from For the temporary "custom variant" of the variant generator, there probably needs to be done some extra work. Also it must be checked how As nested CSS selectors are not supported by IE11, this issue is postponed to theme version 6.0.0 |
This is a trade off of the theme switcher when you have selected a non default variant. The site first loads with the default variant and afterwards reapply the previous selected non-default variant. I tried to keep the switch as early as possible but there may be a recognisable flickering. Technically there is not much I can do about this - or at least I have no idea how to avoid this completly.
I am really thinking about providing another
neon
variant in the showcase resembling your current style. Just for the fun :-)Btw: I've "booked" a place in the showcase section of the exampleSite for the GoboLinux documentation.
Originally posted by @McShelby in #175 (comment)
The text was updated successfully, but these errors were encountered: