Live data from Hacker News

Modern CSS Code Snippets: Stop writing CSS like it's 2015

modern-css.com

1–10 of 318 posts

Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015

#3
2015 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.

Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015

#5
post #3

2015 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…

[deleted]

Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015

#6
post #3

2015 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…

I definitely don't agree with all of these, but grid centering is pretty nice and has a lot fewer quirks than Flexbox based solutions.

Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015

#7
post #2

Is 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.

AI got it from people though.

I too am saddened by the instant-polish marketing pages everyone and their grandma deploys to Render, but also some people at some point in time really did make these effects. And they are nice. HTML based UIs will always have a place in my heart.

Btw: actually I think webflow did more to pump this stuff out to the masses. The animate on scroll being the biggest offender. It's so good, but not for every literal text paragraph on your local bakery's website.

Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015

#9
post #4

CSS 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.

Yeah let's do that. You have everything related to your component on place instead of jumping between files.

Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015

#10
post #2

Is 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.

You’re right not to trust it, it’s wrongly calling sibling-index() widely available. And that’s the first example I checked.
Post reply on HN