News for hackers. Stuff that matters.
Re:Mobile-First CSS: Is It Time for a Rethink? by keyle on Sunday June 19, 2022 @06:22PM (#31804100)
Dumb Q: if you split them as in the example at the end of the article... then you have a lot of duplicated rules obviously as 90% of your CSS _should_ be the same?

Maybe the example at the end wasn't clear enough that you should still have a base CSS that encompasses the common parts?

Re:Mobile-First CSS: Is It Time for a Rethink? by gnabgib on Sunday June 19, 2022 @06:35PM (#31804186)
It looks like Patrick is proposing the `default.css` holds most of the CSS (the 90% you're talking of), with mobile/tablet/desktop/print holding only variances over those base settings (so they'd only be the further 10% and only one downloaded matching the media definition.. maybe two if you print preview)
Re:Mobile-First CSS: Is It Time for a Rethink? by httpsterio on Sunday June 19, 2022 @08:22PM (#31804891)
In reality, your css file size is most likely not going to be any type of bottle neck in website performance anyways.

In my experience, browser side javascript is always the biggest render blocking issue with all the on-the-fly dom manipulation it might entail. Viewport specific css usually adds some kilobytes, a few hundred at most but the browser tends to be relatively swift about those as long as you don't use a lot of stuff like transitions or wildcard selectors on a broad spectrum.