Live data from Hacker News

Solved by Flexbox

philipwalton.github.io

51–60 of 127 posts

Re: Solved by Flexbox

#51
post #45

I certainly wonder what has gone wrong at W3C that resulted in the situation that the world's leading layout language didn't support proper vertical centering for several years (to give an example). How could this possibly happen?

My favorite misconception! CSS 2 does support vertical centering. Google "absolute centering". I had to implement the chapter and verse that explicitly describes vertical centering...

Re: Solved by Flexbox

#52

Solved by flexbox is nice. Regarding flexbox itself: the syntax is confusing. After working on html/css, leaving, using auto-layout (obj-c, ios) and coming back to trying flexbox, I am scratching my head, who came up with this? row/column - use horizontal/vertical or hor/ver for short. justify-content and align-items mean different things depending on whether you're using row or column - what? why not just have hor-a…

The fact that justify-content and align-items changes based on horizontal or vertical is useful for many reasons: toolbars that can become vertical or horizontal per user customization, or vertical writing-direction, for example.

Re: Solved by Flexbox

#53

spacer.gif

a down vote for "spacer.gif"? kids these days, just don't remember

Please note that the HN community takes a rather strict approach when moderating comments that contribute noise to the conversation. "Nice article!" comments are routinely downvoted. As is sarcasm, witticisms, memes, references and other styles of comments that occur frequently but do not contribute to the discussion. It's a knowingly doomed attempt to hold back the flood of noise that covers Reddit.

Re: Solved by Flexbox

#54
post #20
post #13

Earlier quoted context omitted.

Here is some extensive discussion on that very issue: https://twitter.com/nikitonsky/status/561941079038390273?__h... Basically, constraint solving is harder to understanding, doesn't support wrapping, and is slow.

This is the kind of response I was looking for. Though I have to ask, is this specific to Cassowary.js or to Cassowary constraint solver in general? Because from what I've seen/heard, the Cassowary constraint solver is used extensively in Mac OS X/iOS for UI layout, which AFAIK isn't really referred to as slow. Plus the constraint solver does operate on a matrix of constraint, which should make it easier to work on G…

GPU based Web page layout has so many practical hurdles to overcome that the fact that Cassowary can be described in terms of a matrix isn't relevant.

Re: Solved by Flexbox

#55
post #45

I certainly wonder what has gone wrong at W3C that resulted in the situation that the world's leading layout language didn't support proper vertical centering for several years (to give an example). How could this possibly happen?

My favorite misconception! CSS 2 does support vertical centering. Google "absolute centering". I had to implement the chapter and verse that explicitly describes vertical centering...

I think OP's point was that the trick to vertical centering involves wrapping a div as a table cell and then vertically aligning that. It should be much simpler, like 'text-align:center'

Re: Solved by Flexbox

#56

Earlier quoted context omitted.

a down vote for "spacer.gif"? kids these days, just don't remember

Please note that the HN community takes a rather strict approach when moderating comments that contribute noise to the conversation. "Nice article!" comments are routinely downvoted. As is sarcasm, witticisms, memes, references and other styles of comments that occur frequently but do not contribute to the discussion. It's a knowingly doomed attempt to hold back the flood of noise that covers Reddit.

As it should be!

The ubiquity of the "funny == upvote" mentality is rather depressing, and I'm glad that HN (generally) tries to avoid that. It makes the comments section a much more interesting place to be (to me, at least).

Re: Solved by Flexbox

#59
Used this in my presentation on React Native the other day (http://brentvatne.ca/react-native-intro-talk/) as it demos beautifully how Flexbox fixes some persistent CSS layout problems, thanks!

With vjeux's css-layout library, adoption from React Native on iOS and Android and mentions of perhaps adopting it in AsyncDisplayKit, Flexbox is becoming a valuable layout system to be familiar with.

Re: Solved by Flexbox

#60
post #50

Solved by flexbox is nice. Regarding flexbox itself: the syntax is confusing. After working on html/css, leaving, using auto-layout (obj-c, ios) and coming back to trying flexbox, I am scratching my head, who came up with this? row/column - use horizontal/vertical or hor/ver for short. justify-content and align-items mean different things depending on whether you're using row or column - what? why not just have hor-a…

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.

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).
Post reply on HN