top | item 31929329

(no title)

dharmatva | 3 years ago

CSS is simple? You either know too much or too little about it to reach this conclusion.

discuss

order

perilunar|3 years ago

Too much probably, I started web dev before CSS was even a thing, but there's still parts of it I've never used. But I stand by it. The basics of CSS: text styling, colours, padding, margins, etc. are really simple. Layout can be tricky, but even then most sites are just header, footer and two or three columns, and that is really simple to do, even without flexbox and grid.

In fact I think it is easier now than ever: cross-browser issues are much less of an issue, and grid and flexbox have made layout easier.

solardev|3 years ago

The font styling and padding stuff aren't really the meat and butter (edit: sorry, bread and butter... English isn't my first language) though. They're the kind of stuff you learn on day 1, then from day 2 to day 1000+ everything else remains hard.

"Layout can be tricky" is a... slight understatement? These days almost all web layout is handled through CSS, which means multiple layers of flex and grid, yes, along with axes and media queries and unit scales, pseudo classes, inheritance and priority, animations, transitions, gradients, shorthands, variables... and all of that is before adding in frameworks like Bootstrap or transpilers like Sass or abstractions like tailwind and other newcomers.

Remember how many years it took major browser vendors to reach a decent score on the ACID tests? (https://www.acidtests.org/) That was before flexbox and it was already insanely difficult to properly render CSS. It's gotten orders of magnitude more complex since then.

Cross browser issues are more of an issue than ever, since nobody uses CSS alone anymore there's different permutations of layout engines, permissions, web APIs, JS features, etc.

It's... just not simpler. You used to be able to learn nearly all of CSS in a week or so. Then over the last decade or so, I've been unable to even discover new features, much less keep up with them. Granted I'm getting old too, but man, it's really not a simple language.

Markdown is somewhat simple, but even writing a parser for that is hard. CSS and the DOM are waaaaaay complex. There's a reason there's only like three actual parsers for them (Blink, Webkit, Gecko).