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

Non-JS fallback #33

Open
jeremykohn opened this issue Feb 21, 2016 · 2 comments
Open

Non-JS fallback #33

jeremykohn opened this issue Feb 21, 2016 · 2 comments

Comments

@jeremykohn
Copy link

If a web page's styles are all set by Descartes, what happens when JavaScript is disabled? Does the user just see unstyled text?

It seems to me that static styles could be generated server-side as a fallback for browsers that do not (or cannot) have JavaScript turned on.

@JonHMChan
Copy link
Owner

@jeremykohn currently there's no fallback, but that's the active discussion right now here: #26. It's actually a good idea to generate a CSS fallback for performance reasons as well as no-JS scenarios.

@JonHMChan
Copy link
Owner

@jeremykohn you'll be interested to see that https://github.com/JonHMChan/descartes/blob/master/src/descartes.js#L441 has been implemented to generate a CSS fallback based on what's typically calculated from the core library. The only thing that may be missing are styles based on event listeners (basically may mean generating JS) but generally, it's a good fallback for initial loading.

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

No branches or pull requests

2 participants