3 ms·
CSS is not impossible to manage if you keep things modular and avoid specificity issue (basically, use something like BEM and pretend the "C" in "CSS" doesn't e
by jordanlev 10y ago
CSS is not impossible to manage if you keep things modular and avoid specificity issue (basically, use something like BEM and pretend the "C" in "CSS" doesn't exist).
re: HTML: layout and positioning is the domain of CSS, not HTML. HTML's purpose is to provide semantic structure to the content and non-semantic styling hooks (divs and classes) for CSS.
It's true that layout has sucked for a long time (more accurately, it hasn't really existed in CSS), but with the coming grid spec, it will finally get a lot better. Flexbox is great for solving certain problems, but wasn't intended to deal with overall page layout. (Basically, flexbox is for laying out one dimension -- a single row or column -- whereas the grid layout spec will handle two-dimensions.)
- hackerboos 10y agoWe use BEM and Sass at work and our CSS is still an unwieldy mess.
- StrangeOrange 10y agoEver thought you're just not that great at writing it? I tend to use a combination of BEM component based rules and AtomicCSS inspired class-style, and my Sass tends to be pretty damn clean. I think a lot of the problems with "web dev sucks!!12" mentality is that people come to it thinking that it should be easy, but it really isn't, and it's not going to be anytime soon. Trying to build applications for multiple browsers to be used on multiple devices on multiple OSs that look good and work well isn't an easy job. No, it's not perfect, but if you pay enough attention and do things right then it's quite a nice experience. If your CSS sucks, maybe don't blame your tools before you blame yourself.
- GrinningFool 10y agoThe thing that makes me dubious of this claim is the number of years for which we've been reading variants of, "the upcoming (grid/flex/canvas/css3/html5/ecma spec/etc) will make things much better".
- jordanlev 10y agoI was talking specifically about layout (because the comment I was replying to mentioned layout specifically). I don't think any of the things you listed promised to improve layout, except flexbox and grid. And flexbox does improve one-dimensional layouts -- vastly so. I suppose the jury is still out on the grid spec, but it is in the process of being implemented by all the browsers and you can actually play around with it (behind feature flags).
- tengbretson 10y agoLiterally all of the things you listed have made web programming much better.