Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm wondering how switching from a css-in-js library to <link> + inline styles would impact CLS. With css-in-js we have some built-in CLS protection in that I think it blocks the JS until the CSS is present, by definition. At the least, it sounds like <link> + inline styles would take more analysis effort to determine what the critical css is for any component.


CSS-in-JS and external <link> style sheets are not mutually exclusive.

There are a few toolkits out there that let you write component-oriented CSS-in-JS, but during build will extract everything to static external style sheets.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: