3 ms·
I learned CSS twice. The first time was like everyone else does. Google tricks here and there. How to center div, how to create columns with divs, how to do ro
by firefoxd 6y ago
I learned CSS twice.
The first time was like everyone else does. Google tricks here and there. How to center div, how to create columns with divs, how to do rounded corners etc. This will only get you so far.
The second time around, I took a bunch of courses online, lynda, one of by designers, and bought books. Once you understand the fundamentals of CSS, you can work just fine with css2. Css3 is just an added benefit and great for animation.
- eurasiantiger 6y agoI’m in the same boat. ”Learnt CSS” in the late 90’s/early 00’s, and learnt it all over again in the 010’s. It’s true, CSS2 is all you need to build any layout. I actually prefer float grids over flexbox and CSS grid. Float grids are so simple to use in comparison, and all it requires is a list of breakpoints and two to three SCSS mixins, depending on how fancy you wanna get. But no way I’d write it without modern tooling.
- sixQuarks 6y agoAre you sure you know flexbox and grid well? I don’t see how you could prefer floats.
- petepete 6y agoGrid and flex let you do in five lines what used to take fifty. I'd never go back.
- eurasiantiger 6y agoThank you for your quadratic-or-worse layout calculations. Then people wonder why the web eats their phone battery.
- wwweston 6y agoFloats have their place. The conceptual model is simpler for some simple cases, and you can build layouts that reflow over different viewport sizes without worrying about breakpoints. Once you need equal-height boxes in your layout, though, it's time to use something else.
- eurasiantiger 6y agoThey are faster to render especially when resizing the window, and they work in the exact same mental model of layout as everything else in CSS: the box grows to fit its content. Flexbox and grid do not subscribe to this: flexbox shrinks/grows its content to fit itself. Grid is a configurable beast, something in between, and also makes it possible for grid content (not the container) to define how it itself is laid out.
- aitanabewa 6y agoI'm on my second time (: . Do you have links to the resources that you mention?
- cpmsmith 6y agoThis is only applicable if your brain is wired a certain way, but in case it is, I strongly agree with this note at the end of the article: > The CSS specifications are surprisingly user-friendly! I learned a ton reading the [Flexbox spec](https://www.w3.org/TR/css-flexbox-1/ https://www.w3.org/TR/css-flexbox-1/). The CSS specs are fairly intelligible (as specs go) and once you have enough base knowledge to get a foothold while reading them, they force you into thinking about CSS much more systematically, because that's how specs are written.