8 ms·
I see what you're saying and I agree it would be great to be simpler. My perspective is that the complexity is actually in the flexibility in CSS and the number
by proexploit 13y ago
I see what you're saying and I agree it would be great to be simpler. My perspective is that the complexity is actually in the flexibility in CSS and the number of options provided to you. I'm not sure how I'd make it simpler without removing some of the control.
- riffraff 13y agohonest question, but what would the problem be with having "margin: auto" work vertically as it does horizontally? EDIT: I mean, what freedom would have been lost when it was designed to work like this, not talking of changing it now.
- jessedhillon 13y agoWhat would you do with this case then? .outer {height: 1200px; width: 800px;} .inner {margin: auto;} <div class="outer"> <p class="inner">This is centered vertically</p> <p>But where should this go?</p> </div> And what if both p elements had the `inner` class?
- coldtea 13y ago>My perspective is that the complexity is actually in the flexibility in CSS and the number of options provided to you Not really, most of the complexity is of the ill-thought design they started with, and the LACK of options for certain things. Initially the envisioned CSS as a styling technology, so layout was an afterthought. Even the messy floats hacks (those one that replaced tables) wasn't something that was though of specifically as a complete layout solution. We had to wait 10+ years, to have actual layout solutions catering to the needs of web designers: Flexbox, Regions, Multi-Column layout and Grid Layout -- and of course those are still not implemented totally by browser vendors, give a few years wait for that too.
- proexploit 13y agoThat's fair. Perhaps I'm too comfortable with the concepts I've been forced to learn thus far.