You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For components that use shared styles or that are repeated many times, this can lead to a lot of duplicated <style>s in the DOM. Browsers are pretty smart about optimizing this, and compression will remove duplication, but it's still a bit sub-optimal. Ideally we should have a mode to emit <link rel=stylesheet>s instead of <style>s. (Or just make <link>s the default.)
The text was updated successfully, but these errors were encountered:
Some folks actually think you should just inline all your CSS into your HTML anyway, since the cache benefits of .css aren't always enormous and you can get progressive rendering instead
It's complex to implement
However, we do have some internal evidence that separate <link rel=stylesheet>s may be more performant than inlined <style>s. These tests aren't conclusive, so it would be good to continue experimenting.
If we do implement this, it would be nice to do it in a bundler-agnostic way, similar to how Svelte/Vue allow their stylesheets to be hoisted out of components by Webpack/Rollup/etc. which is responsible for handling the actual *.css files and <link rel=stylesheet>s.
Right now we render inline
<style>
in components when we do SSR:For components that use shared styles or that are repeated many times, this can lead to a lot of duplicated
<style>
s in the DOM. Browsers are pretty smart about optimizing this, and compression will remove duplication, but it's still a bit sub-optimal. Ideally we should have a mode to emit<link rel=stylesheet>
s instead of<style>
s. (Or just make<link>
s the default.)The text was updated successfully, but these errors were encountered: