5 ms·
Box model + flex box + the display modes + "positioning" (stacking contexts) are typically the most confusing parts of CSS, I feel. Add maybe margin and paddin
by moritzwarhier 3y ago
Box model + flex box + the display modes + "positioning" (stacking contexts) are typically the most confusing parts of CSS, I feel.
Add maybe margin and padding, and how they interact (margin collapse, no margin collapse in flex or grid context, box model again, auto values).
But then, that's basically all the hard conceptual parts. But they are mostly intuitive and well-designed! I know I'm alone with this opinion.
Naming + global scope is the rest of the problem, but even without this, here is where the problem of creating design system shows up, too. Harder than CSS probably :)
- interstice 3y agoSomething I don’t like about the way grid and flex has been implemented is the seemingly random application of naming conventions. Memorising the differences between justify items and align items, the argument order for repeat including min and max content variables. The odd naming convention for grid area.. There’s a lot going on. Oh yeah and debugging a broken sticky because some parent has stacking context stuff going on, also fun.
- antisthenes 3y ago> Box model + flex box + the display modes + "positioning" (stacking contexts) are typically the most confusing parts of CSS, I feel. That's like 90% of UI. Saying they are the most confusing parts of CSS is basically admitting that CSS is awful to learn and use.
- moritzwarhier 3y agoYeah but I'm not sure if that's primarily a fault of CSS. I just wanted to enumarate the "hard parts". But even if I were to agree, what layout and "styling" language or API is the easiest, most logical and well-designed one in your opinion, that still covers the same variety of use cases? From print-like simple layouts to all complicated, nested application UIs for all imaginable screen sizes? Just curious, I'm not writing that much CSS anymore and I have cursed at it as well. But I feel it is also powerful and sometimes, yes, even beautiful to use. Often things that bother people are a feature at the same time, e.g. visible overflow by default.
- PH95VuimJjqBqy 3y agowhose fault is it then? We had desktop UI's in far simpler forms years before. Yeah, sure, there are new requirements, but those requirements didn't actually need the complexity of modern CSS. modern CSS came about because people like to be fancy. You value the wrong thing, you get the wrong thing.
- postalrat 3y agoI've found people have the most trouble taking full advantage of the cascading feature of css.