Solved by Flexbox
111–120 of 127 posts
Re: Solved by Flexbox
#112Re: Solved by Flexbox
#113Solved 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…
But it seems that w3c has something in common with war: it never changes.
Re: Solved by Flexbox
#114Earlier quoted context omitted.
The point remains that centering vertically with absolute positioning does not work with an element of variable height. Meanwhile, horizontally centering something of variable width is dead simple. Why the difference? It's a shortcoming of CSS.
There is a fundamental reason for the difference: in standard CSS block/inline layout, widths depend on parent widths, but heights depend on child heights. Far from being stupid, this difference is the entire reason CSS is parallelizable at all. Flexbox makes this simpler by switching to an entirely different model, which is the right approach for UIs (as opposed to documents). But I can't really fault CSS 2.1 for no…
Re: Solved by Flexbox
#115 1 4 7 10
2 5 8 11
3 6 9 12
Other than than columns, which dont respond the screen size that well, this is the only good option. Thanks for educating me!Re: Solved by Flexbox
#116Earlier quoted context omitted.
Absolute centering only works when the element you are trying to center has a defined height. If you are trying to center an element with unknown height inside a container with unknown height, the table-cell is likely the front-runner, sadly.
I like the translateY(-50%) trick. But yeah, it is a pain point. Hence flexbox.
Re: Solved by Flexbox
#117Just started a test project using flexbox and I'm finding myself using it constantly. In the "individual grid sample" why have you chose to make a 2/3rds and 1/3rd column with divs respectively flex:1; width:33.3333333% instead of leveraging the ratio flex:2; flex:1
Re: Solved by Flexbox
#118Re: Solved by Flexbox
#119Earlier quoted context omitted.
Have you also tested it inside of an iframe? As far as I know support on Safari wasn't quite there yet. Last when I checked, and that was almost two months ago, Flex broke down pretty badly on iOS Safari, both on iPad and iPhone. Guess I need to revisit this probably. Thanks for the great piece of work!
So unfortunate that we still can't just use flexbox without hacks. Do you know of any methods of 'fixing' Safari?
Re: Solved by Flexbox
#120Earlier quoted context omitted.
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…
Link to the Flexbox spec for anyone interested: