3 ms·
I've used advanced CSS nonstop for the last 15 years as a design specialist. I do love CSS and how it has grown. I really can't say I have any complaints, and m
by iratewizard 6y ago
I've used advanced CSS nonstop for the last 15 years as a design specialist. I do love CSS and how it has grown. I really can't say I have any complaints, and much of what I do when converting my prototypes to layout is a process of intuition.
With the important thing, it's a matter of specificity. I've gotten in the habit of thinking about styles in layers of abstraction. When I'm working in a high level of abstraction, I keep it to a tag or a class. As I go lower down I add standard levels of specificity so the importance level changes (because 'div .class' will be inherited over '.class' every time). Class naming conventions help this too. If I know I'm overwriting an existing style, I often copy the existing style's rule exactly and just add 'html ' or 'div ' to the start of the rule out of habit.
- searchableguy 6y agoYou nailed the problem. It's hard to compose css without resorting to what feels like a hack. @mixins and @appliers should have been part of the css years ago.
- tobr 6y agoI’ve also been writing CSS for about 15 years, and I have endless complaints. I think the provisions for maintaining and composing styles are just really lacking out of the box. It’s better with the recent addition of calc and var, but even those feel strange, underpowered and bug-prone. This is aside from complaints about the many overlapping, poorly-designed layout systems that interact in baffling ways, and the mindless profusion of syntax variations.
- RobertRoberts 6y agoSo are your "endless complaints" about web designing documents or applications? (curious to update my experience database with your response) I think CSS was designed for documents and not apps. And almost all the real difficulties I have with CSS (and all the ones I hear from others) is with application development, not web design per se. CSS is my favorite coding "language", but I have always been an artist & coder.
- tobr 6y agoI think it’s worse for apps than document-based websites, but the border between those are fuzzy to me. I’ve certainly run into problems with both.
- brownbat 6y agoGenuinely reassuring to hear. Really didn't want to toe the line into code wars too much, I'm sure there are some features of css that are the result of difficult tradeoffs and hard won lessons over the years, and I know I haven't spent enough time with it. I think for me, I naturally gravitate towards an atomic, functional style where no segment of code knows anything about the rest of the program. Working in "inheritance is everything" mode was a sort of mindscrew, but maybe healthy for me in the long run.