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
CSS-in-rs #27
Comments
Some prior discussion in #1 I think you'd still want to have the option to write to a file. One advantage on the write-to-file side of things is better caching since you don't have to re-download both the app and CSS when you only change the CSS (and vice versa). Often times application code will change way more often than styling. But yeah - totally agree that the ability to inline would be useful. Any thoughts on how we might support both cleanly? |
I think the two are at odds with each other. CSS-per-component is not something you want to extract and concat with all other CSS, because this means that a change to a single component's CSS anywhere in the app invalidates the whole CSS bundle. So, there's no immediate victory right now. |
I don't understand the purpose of the current behavior of the
css!
macro.Why is CSS being written to an external file, regardless of if the component will ever be displayed or not?
I feel like having the component own its css makes more sense than a macro writing files during compilation. This way, critical CSS can trivially be inlined during SSR.
The text was updated successfully, but these errors were encountered: