Live data from Hacker News

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

modern-css.com

41–50 of 318 posts

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

#41
post #23
post #13

Earlier quoted context omitted.

Is jumping between files supposed to be difficult or something?

Is staying in one file supposed to be difficult or something?

this is grey text from tailwindcss.com, I wouldn't call it easy and readable.

Because Tailwind is so low-level, it never encourages you to design the same site twice. Some of your favorite sites are built with Tailwind, and you probably had no idea.

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

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

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

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

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

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

#44
post #30

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 is great for MVVM indeed. Who is still using MVC in 2026?

Ever heard of Django? ASP.NET? Most UI frameworks, including ASP.NET Core, Spring Boot (Java based framework), Ruby on Rails, and Django (Python) are all based on MVC.

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

#46
post #35
post #32

Earlier quoted context omitted.

If you move the data (the M and the C) entirely out of react, and only pass it in via props, there would be only one place — the root react node — where the props could get into react. Is this what you have in mind? Or are you envisioning multiple root nodes?

With signals you can avoid the prop drilling. I think signals can help a lot with this approach

I think the parent wants to separate the V from the M/C. If you smuggle signals inside of components to avoid prop drilling, you would be coupling the M/C and the V. I suppose that's not what the parent has in mind.

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

#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!

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

#49
post #30

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 is great for MVVM indeed. Who is still using MVC in 2026?

Adding to sibling comments, Phoenix. And it’s a damn nice experience at that.

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

#50
post #43
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.

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

You can separate concerns without violating locality of behavior, and that’s exactly what tailwind does.

It admittedly does not do a good job at being very DRY but I think that’s poorly applied to HTML/CSS in general, and the most DRY css is often over abstracted to the point of becoming nigh uninterpretable.

Post reply on HN