7 ms·
CSS is simple? You either know too much or too little about it to reach this conclusion.
by dharmatva 4y ago
CSS is simple? You either know too much or too little about it to reach this conclusion.
- perilunar 4y agoToo 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 4y agoThe 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/ 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).
- perilunar 4y ago> 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... You don't need all of that to build most websites, and certainly not to get started. I'm familiar with all of that but I don't remember most of it — I just look it up again or re-learn it as needed. > and all of that is before adding in frameworks like Bootstrap or transpilers like Sass or abstractions like tailwind and other newcomers. Yeah, don't do any of that until you've mastered basic CSS layouts. > You used to be able to learn nearly all of CSS in a week or so. You can still learn as much in a week as before, and you don't need to learn it all to start being productive. If you want to be a professional web developer, then yes, expect to spend more that a week learning CSS; if you just want to build your own blog or hobby site, then you can learn enough in a week to build a nice site. CSS is not a simple language, but the basics are simple, it's easy to get started, and the learning curve is not too steep in my opinion.