DEV Community

Discussion on: Inlining Critical CSS

Collapse
 
imkevdev profile image
Kevin Farrugia

Thank you Paweł. Yes there is (and it is a superb framework), so if your production CSS is tiny, go for it, but in many cases I still think non-critical CSS should be lazy loaded... because why not?

Collapse
 
pavelloz profile image
Paweł Kowalski

To avoid additional request and layout shift.

Thread Thread
 
imkevdev profile image
Kevin Farrugia

We should avoid layout shift because the critical CSS would have already been fetched. The non-critical CSS will be applied on elements below the fold or out of sight.

Thread Thread
 
pavelloz profile image
Paweł Kowalski

In theory - in practice its usually not the case. ;)