onlinepersona , (edited )

I believe a lot of the negativity towards CSS stems from not really knowing how to use it. Many developers kind of just skip learning the CSS fundamentals in favor of the more interesting Java- and TypeScript, and then go on to complain about a styling language they don’t understand.

My negativity towards CSS is that it was made by people who used to style newspapers and the terminology plus way of thinking was just copy-pasted to the digital world where things aren't the same. For example, the display property has so many values that I don't understand... same goes for position and a bunch of other properties and how they interact. Sometimes setting one property can completely invalidate another one. position, display and width or height are examples of that.

The major problem with CSS is that it's a language which requires a lot of memorisation, not understanding. Unlike programming languages where you can reason why things have to be written a certain way from a point of understanding, with CSS the why is often "because it worked that way when I tried it".

To understand why certain things work or don't in CSS, you have to understand typesettings,maybe color theory, browser history, and a bunch of other things. It's not a surprise that most people memorise CSS stuff.

I compare it to our current school system: it's very good for people who can/enjoy memorizing things (at least until the test). For those who care more or are better at understanding and reasoning, it is hell. CSS is like our school system.

Anti Commercial-AI license

cupcakezealot ,
@cupcakezealot@piefed.blahaj.zone avatar
  • you've never needed javascript
FailBetter ,

TSMT

mindbleach ,

There was a time where you really needed Javascript and the Javascript you needed did not exist yet so you actually needed Flash.

If all your site did was display static content or maybe POST to a php back-end, sure, JS was optional. But if you wanted a website to do anything, or look like more than a jumped-up Word document, then JS was your only sane option until maybe 2011. And even then the Javascript you needed was actually jQuery.

jimmy90 ,

with so many wasm frameworks you can use any language you like

python ,

I bookmarked another post from this community that might relate nicely!
It's time for modern CSS to kill the SPA

Haven't gotten to trying all the cool css stuff in my own projects yet, but it certainly sounds interesting :D

vermaterc ,

And there is also https://plainvanillaweb.com/index.html that teaches how to replace js frameworks with what modern browsers offer right now.

Ephera ,
:root {
  color-scheme: light dark;
  --text: light-dark(#000, #FFF);
  --bg: light-dark(#EEE, #242936);
}

Hmm, I guess the advantage of that over

@media (prefers-color-scheme: dark) {
    /*set different values for variables*/
}

is that you can set the color scheme via a button much more easily then.

Had to think about that for a moment, because the old way of doing things seemed fine, but that is a pretty good reason, I guess.

bleistift2 , (edited )
@bleistift2@sopuli.xyz avatar

I wish there was a comprehensive resource for CSS. I’ve known for a very long time that I don’t know the half of it. But randomly clicking through the MDN topics has a very [Edit: low high] cost to benefit ratio. Where do you learn about the gems of CSS without getting bogged down by the obscure topics like text-emphasis-style?

Zier ,
@Zier@fedia.io avatar
Kissaki ,
@Kissaki@programming.dev avatar

Josh W Comeau is a great resource to understand CSS.

CSS Tricks I don't visit regularly, but have occasionally seen neat examples. I presume someone less experienced or more "see by individual or small examples" finds it more useful than I.

hperrin ,

That’s great and wonderful, except some of those things don’t work on an iPhone. As long as Apple is holding back the industry, we’ll have to use JS for some things.

BrikoX OP ,
@BrikoX@lemmy.zip avatar

Or just say fuck them and refer them to Apple customer service when they start complaining since it's an Apple issue not platform issue.

bleistift2 ,
@bleistift2@sopuli.xyz avatar

Do you work as a web dev? Flipping off 20% of your user base doesn’t exactly land you jobs.

30p87 ,
@30p87@feddit.org avatar

I'd guess a large portion here are hobbyists, and I'm totally fine with showing 20% of random people the consequences of their choices, as it has no actual impact on anyone, and a lot of professionals have to adhere to company standards, so going JS-less isn't even an option anyway.

victorz ,

random people the consequences of their choices

These random people aren't aware of the consequences of their choices and shouldn't be punished for them. But at the same time, Apple needs to feel some pressure. But I doubt that regular users are going to go to Apple's customer service and complain about sites that aren't working on their phones. People just don't do that. It's a tricky conundrum.

BlackEco ,
@BlackEco@lemmy.blackeco.com avatar

Yes, why is Apple still tying Safari updates to iOS's in 2025? Android's WebView can be updated from the Play Store.