News for hackers. Stuff that matters.
Re:Critical CSS by lxe on Tuesday May 06, 2025 @01:40PM (#43907705)
Unless you're sure that your the "non-critical" css doesn't cause layout shifts (aka, it doesn't overload any "critical" styles), you're gonna see layout shifts even on fast connections if you load some styles at the top of the document and then do a link rel at the bottom.
Re:Critical CSS by rtsil on Tuesday May 06, 2025 @01:52PM (#43907829)
The critical css should cover everything above the fold to avoid that visible reflow.
Re:Critical CSS by lxe on Tuesday May 06, 2025 @02:21PM (#43908103)
Then what does the "non-critical" css do?
Re:Critical CSS by bawolff on Tuesday May 06, 2025 @02:32PM (#43908204)
The non-critical things?

I mean, i agree with you that this is insanely easy to screw up. However in most websites there is obviously css which doesn't cause reflows and is not needed for first paint. Actually separating that out correctly seems easy to mess up, but it obviously exists.

Re:Critical CSS by youngtaff on Tuesday May 06, 2025 @03:20PM (#43908681)
Where’s the fold in a world of 000’s of viewports?