Re:What the FlexBox? – A free 20 video course to learn CSS F...
by orliesaurus on Wednesday January 13, 2016 @11:35AM
(#10895504)
proof that css is still broken in 2016
[ Parent
| on HN ]
Re:What the FlexBox? – A free 20 video course to learn CSS F...
by deadowl on Wednesday January 13, 2016 @02:48PM
(#10896952)
Well, I would say that vertically centering a thumbnail to the left of a block of text would certainly be easier with flex box. My previous solution would have been:
.container { position: relative; }
.thumbnail { position: absolute; margin: auto 0; width: w; height: h; margin: auto 0; top: 0; right: 0; bottom: 0; left: 0; }
.summary { padding-left: w; min-height: h; }
With flexbox that becomes: .container { display: flex; }
.thumbnail { align-self: center; }
There are a lot fewer traps and design is a lot more scalable in that you don't have to worry per se about width and height.
Re:What the FlexBox? – A free 20 video course to learn CSS F...
by roneesh on Wednesday January 13, 2016 @11:50AM
(#10895635)
As I said above in a post, in my opinion Flexbox is win, it's an attempt to create a logically consistent tool for layout, vs the comparative hackery of combining float/position/display/margin to achieve your desired layout. Is it perfect? I doubt that, but it's definitely a step towards CSS being less broken.