Live data from Hacker News

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

modern-css.com

91–100 of 318 posts

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

#91
post #42
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 dare you to find any analytics, anywhere, that show any IE 11 usage. It would be utterly negligent to still be running IE in a corporate environment. It’s a huge security risk.

0.02% as of January 2026: https://www.stetic.com/market-share/browser/

Results may also be skewed because IE mode in Edge will masquerade as IE.

> Internet Explorer mode in Microsoft Edge enables backward compatibility and will be supported through at least 2029.

https://learn.microsoft.com/en-us/lifecycle/announcements/in...

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

#92
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.

HTML vs. CSS is a separation of technologies. If HTML was really only about the content and the CSS was only about styling, we wouldn't have to write div soups to style our websites (.container-wrapper .container .container-inner { /* "separation" */ }) and we wouldn't have to adjust our HTML when we change the layout.

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

#93
post #48

So where are we at with utility libs (tailwind/tachyon) vs inline css in js vs preprocessors (sass/scss) vs vanilla modern css?

Wherever you want to be. Tailwind works for your team? Go for it. Inline CSS for your solo project? By all means. Still stuck on SASS? It'll keep working just fine. All in on modern CSS? More power to ya!

Missed opportunity to turn this into a poem

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

#94
post #86

Earlier quoted context omitted.

It's a choice. The dominant paradigms choose not to. I disagree. And that makes me the loser here

Another loser here to second you

I wrote these libraries like

https://github.com/kristopolous/db.js and https://github.com/kristopolous/evda in the early 2010s. I spent months on them

I was all in. I swore off touching front end in 2022. It's terrible now

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

#95

Earlier quoted context omitted.

Wait until you see React & JSX... At least html and CSS are both presentation. React/JSX now confuses presentation and business logic.

> React/JSX now confuses presentation and business logic React was originally designed to be the "V in MVC". You can still use it that way. React becomes very simple when you only use it as the V in MVC.

> React was originally designed to be the "V in MVC"

React was originally desingned to be php in the browser.

php5 -> HHVM -> Hack -> XHP -> JSX

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

#97
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.

Tailwind is not what you're describing.

Isn’t that what utility classes are? Shorthand for inline styles?

Not saying it’s good/bad, but it feels like that’s the use case

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

#98

I dislike the examples here where the "old" way works in all browsers, but the "new" way only works in Chrome/Edge. IMO, it's irresponsible to include such examples, since it makes the Blink monoculture worse.

Agreed; wish the default filter was "newly available" since that includes all 3 major browsers (Chrome/Edge, Safari, Firefox) but still includes new stuff that isn't "baseline" yet.

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

#99
post #85
post #13

Earlier quoted context omitted.

Is jumping between files supposed to be difficult or something?

You can literally command click a class to go into a styled components css file. I do not understand what the big issue is.

Cognitive load of looking at 12 open files trying to understand what’s happening. Well, in fairness some of those 12 are the same file because we have one part for the default CSS and then one for the media query that’s 900 lines further down the file.

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

#100
post #43

Earlier quoted context omitted.

The deadest horse in web development is the myth of “separation of concerns”

I was recently doing some very specific web scraping of some very public very static documents. About 25% of them use a soup of divs with hashes for class names. Not a or or in sight. I am fine with the idea of what tailwind does but like at least using semantic tags where appropriate could be a thing.

Tbh there's nothing really wrong with that. You don't need stuff like article or section if you set the right attributes. Often easier to just use divs to get the structure right, and figure out the meaning later.
Post reply on HN