𝗪𝗵𝘆 𝗮𝗿𝗲 𝘄𝗲 𝘀𝘁𝗶𝗹𝗹 𝘀𝗵𝗶𝗽𝗽𝗶𝗻𝗴 𝗖𝗦𝗦 𝗽𝗮𝗿𝘀𝗲𝗿𝘀 𝘁𝗼 𝘁𝗵𝗲 𝗯𝗿𝗼𝘄𝘀𝗲𝗿?
Frontend developers face a choice. You use heavy CSS-in-JS libraries. You pay for it with large bundles. You pay for it with slow Largest Contentful Paint (LCP) times.
You want dynamic styles. You do not need a CSS parser in the browser to get them.
Modern tools offer a better way. You can use a build-time scanner. This approach takes 10ms during your build process. It results in 0ms of work for the user.
Zero-runtime CSS provides the same flexibility. It removes the weight from your application.
Why is zero-runtime not the industry standard yet?
I want to know your experience. What trade-offs keep you using runtime CSS-in-JS libraries?
Share your thoughts below.