Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I disagree with row/column vs. hor/ver - the web mostly operates on thinking in terms of rows and columns. Otherwise, I do agree there is some confusion with the flexbox syntax and understanding it. I have found http://css-tricks.com/snippets/css/a-guide-to-flexbox/ immensely useful.


I didn't find it helpful - confusing, yes. I found the spec better, which I thought there'd never come a day I'd say but yes - the flexbox spec is the best resource for understanding flexbox. Wow. I know.

I think I'm just ranting on the html layout rules in general, for instance:

https://css-tricks.com/almanac/properties/m/margin/

This points out like 3 things that make NO SENSE. To center something horizontally, you use margin: auto; What? Margins are for having space between elements, not for centering anything. But ok let's say it is for centering, which makes no sense, then you should be able to set the vertical margins to auto. Wait, you can't do that. WHAT!?!

It goes on to say if you have 2 paragraphs with top and bottom margins, that doesn't mean you have 2 paragraphs with top and bottom margins some of the time. Because 2 paragraphs, the top/bottom margins of the 2 paragraphs will collapse. WHAT?!?!?!?!

Yeah, flexbox is just another abysmal attempt, in the right direction mind you. I don't know who runs the show but I'd say a 3rd year comp-sci student in one year, can come up with a better layout engine (how it works, not performance, by copying auto-layout for instance) than what is currently in existence.


> The flexbox spec is the best resource for understanding flexbox.

Link to the Flexbox spec for anyone interested:

http://www.w3.org/TR/css3-flexbox/


Actually I just read "Dive into Flexbox" and in 5-10 min read now have a clear understanding of how flexbox is designed to work. Best explaination I've read.

http://bocoup.com/weblog/dive-into-flexbox/


You can do vertical centering with margin:auto. Just absolutely position.

And margin collapse was a bad idea, I agree. But HTML had it, before CSS. If anyone is to blame for margin collapse, it's NCSA Mosaic. CSS just needed to describe what already existed.


True, but to me it wasn't obvious whether "flex-direction: row" meant horizontal (because a row expands horizontally as you add columns) or vertical (because a table expands vertically as you add rows).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: