Modern CSS Code Snippets: Stop writing CSS like it's 2015
- ktpsns - 8105 sekunder sedanCSS in 2025: Let's write html inlined styles as if it was 2005 and separation of formatting/representation was never invented. I talk of tailwind, of course.
- deadghost - 2241 sekunder sedanSo where are we at with utility libs (tailwind/tachyon) vs inline css in js vs preprocessors (sass/scss) vs vanilla modern css?
- lol768 - 1824 sekunder sedanI'm confused, many of these examples state that they don't work in my browser (Firefox) - but the live demo works fine? Are the demos poly-filled?
- Bengalilol - 7157 sekunder sedanMe: cool, let's be creative, I love 2026.
Browsers: Yeah, but beware of limited availability, most of those creative examples are in the 40-50% browsers support range.
- cwillu - 4376 sekunder sedanStop pinning things to the edges of the screen and window. Some sites have literally over 50% of the viewable area taken up by irrelevant static elements. Let the content scroll, like god intended.
- anematode - 4843 sekunder sedanRandom pet peeve... it annoys me when people have old browser-specific aliases to standardized CSS properties. For example, -o-tab-size and -moz-tab-size instead of just tab-size. Those properties haven't done anything on Opera/Firefox for a decade!
- jgalt212 - 7468 sekunder sedanCSS and JavaScript are like two dysfunctional law enforcement agencies fighting over jurisdiction.
- piskov - 8115 sekunder sedan2015 is good enough.
For example instead of grid center, one can use flex and margin auto.
If you are building really nation-wide products, there are still a lot of guys in corporate with old windows (where even chrome stopped updating like win7). Or, you know, old or poor people with PC from 2008.
Also don’t forget guys with mobile phones: not like one could easily install a browser there. Especially on phones which no longer receive updates.
So writing CSS like it is 2015 is great. Not because it feels great but because it is what caring about your users (and business) is.
Otherwise you’ll get humbled by your clients soon enough. And in corporate they won’t even be your clients unless you support old stuff: IE 11 is a great target if you really want to shine.
- egedev - 1365 sekunder sedan[dead]
- user3939382 - 5502 sekunder sedanCSS is the only thing from browsers we actually need. The rest can be done in a terminal. Contemporary terminals could even render the UI with way less memory. The browser is a nightmare because it wasn’t architected to run applications.
- laacz - 8200 sekunder sedanIs it just me or gradients and tile grid with specific hover effects are AI generated stuff giveaways? Maybe it's old people yelling at clouds, but I'm very reluctant to trust the site, when I see these signs.
Nördnytt! 🤓