-
Notifications
You must be signed in to change notification settings - Fork 248
Ability to inline CSS in HTML #459
Comments
Just interested: with css modules, how it can help? |
@kuzvac I don't think it would help us with anything here. |
The idea is just to inline the CSS to avoid an HTTP query. So no relation with how the CSS is handled (sass, css modules...). |
Oh, ok, thank you. |
Checkout https://github.com/addyosmani/critical-path-css-tools might be useful for this issue. The idea with critical is that is will inline above the fold CSS for that 'instant' load feel without needing to inline all of the sites CSS in the head tag |
Going to be fixed with #925 (moving to user land) |
@bloodyowl @MoOx how exactly was this solved in latest releases? Would be nice to have some guidance as #925 does not say anything about how to inline css. |
Currently all CSS-in-JS examples are extracting inline CSS. Didn't make an example yet for css(?modules) |
Nope, no examples for css (+ modules) yet 😉 i just looked over the css-in-js examples, so should i be able to pull the css the same way?
|
I will push an example ;) |
Since only one HTML per user session is used, no big deal.
And it's good for perf (and gatsby is now supporting this).
A flag in config should be easy (enabled by default), and/or support for CSS chunk names (default to all CSS, support for array to filter chunk names with string/regex support).
The text was updated successfully, but these errors were encountered: