4 ms·
You make a good observation that: > The browser has lots of default, complex behaviors that drive layout, and […] CSS is more about […] guiding that automatic
by svat 8y ago
You make a good observation that:
> The browser has lots of default, complex behaviors that drive layout, and […] CSS is more about […] guiding that automatic engine
I think for most people who struggle with layout, what they really need to learn is what process the browser uses to lay out content, so that they can then turn their mind to how to guide it. Instead, I've seen hardly any CSS tutorials / documentation that start with a description of the layout algorithm and what hooks it provides via CSS; they all start from the meaning of individual CSS declarations, which are never the full picture.
I think there's really room for teaching layout from the other end (the following is the browser's algorithm, and here's what can influence it), for people who think procedurally.
- madeofpalk 8y agoUnderstand the browser and learning how to 'think in CSS' is the biggest trick I've found to being able to work in CSS efficiently. That, and experience. Very rarely do you actually encounter genuinely new layouts in CSS, so with experience you just end up building in your head your own little 'component library' and pattern match designs to that.