Skip to content
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

visibilty:hidden? #50

Open
paintparty opened this issue Oct 30, 2020 · 1 comment
Open

visibilty:hidden? #50

paintparty opened this issue Oct 30, 2020 · 1 comment
Labels

Comments

@paintparty
Copy link

This is not a major issue, maybe not even an issue, just more of a question.
It is something I've seen just a few times over a few months of heavy Stylefy use (have really enjoyed using the lib btw, thx!).

Every once in a blue moon in my dev environment ...
When I change or create a style map that I'm passing to use-style, my style map is applied as a normal inline style (in the rendered element) and also visibility:hidden seems arbitrarily applied to the inline style as well (even when it is not in my style map).

This just now happened to me in a nested ui namespace. I then opened my project's core namespace, the same one from which I'm requiring stylefy and also stylefy-cache, and also calling stylefy-cache/clear. I re-saved it with no changes it the problem was resolved. I know this isn't exactly a detailed reproducible example but I'm not sure how to reproduce it!

Just wondering if you have come across this before? Specifically the style map being unexpectedly applied as an inline style and visibility:hidden making a guest appearance.

@Jarzka
Copy link
Owner

Jarzka commented Oct 30, 2020

Glad to hear you like stylefy.

use-style sometimes returns inline style with visibility set to hidden to hide the component for a short period of time until all the CSS generation is done and the DOM is ready. After that, the component should show normally (if not, the library is not setup correctly or you are not using Reagent).

The reason for this behavior is to keep the library fast by doing as little amount of DOM updates as possible. A more detailed answer can be found in the README file (FAQ: How does the CSS generation work on the frontend?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants