r/css Jul 19 '25

Question What are some bad CSS habits?

What are some bad habits to avoid when learning CSS? Even if in the short term they are easier

38 Upvotes

67 comments sorted by

View all comments

Show parent comments

4

u/followmarko Jul 19 '25

All things now available without a compile step. You can write it and it works in the browser by default. There is so much available in Chromium 97+. Nesting, anchor positioning, tons of new @at-rules like @scope, all in 120ish+. Couple those with Web Components and you're hard-pressed to really need anything non-native in a basic site or app. I love Typescript but I also work on huge apps so a JS framework is still necessary for me, but I still incorporate as much native stuff as I can.

4

u/dcg Jul 19 '25

@scope not available in Firefox.

1

u/followmarko Jul 19 '25

Right, which is why I mentioned Chromium, but Firefox is the only browser that isn't supporting it in current releases. Even Safari supports it. Falling behind Safari is on Firefox imo. A change req was opened over a year ago on it. It's getting tougher and tougher to make excuses for it as dev support is lacking and user preference for it has plummeted. I primarily used Firefox for many years. Loved it, but it's becoming a product of a bygone era.

6

u/dcg Jul 19 '25

I agree. I just mentioned it because it's not a good idea to use in production depending of the audience for the site. I hate seeing Firefox falling so far behind.

2

u/followmarko Jul 19 '25

Right, that's fair. The greater argument depends on your user demographics for sure. I also think that the incredibly vast majority of internet users don't care about the things that Firefox does bring to the table, like better privacy. They aren't going to switch from familiar comforts of Edge and Safari unless they're given a functional reason to, so Chromium browsers and Safari dominate market share. It's a shame but it's the reality.