Row Wrap in flex-box not wrapping in Safari

Per a comment on bugs.webkit.org, it seems the solution is simple! If your style is div.flex { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-flex-direction: row; flex-direction: row; } div.flex .item { min-width: 15em; -webkit-flex: 1; flex: 1; } you just need to add more explicitness to your flex declaration. In fact, I think … Read more

Flexbox: flex-start/flex-end, self-start/self-end, and start/end; What’s the difference?

The values flex-end and flex-start (among others) were created for use with flex layout. However, the W3C has been developing the Box Alignment Module, which establishes a common set of alignment properties and values for use across multiple box models, including flex, grid, table and block. So what you’re seeing are the newer values that … Read more

Do I not understand the flex-grow property?

You have to specify a value for flex-basis as well (not specifying this property causes behaviour similar to using the initial value, auto). Add flex-basis: 0; to both children or just set it with the shorthand: .flex-item { flex: 1; /* flex-basis is 0 if omitted */ } .big { flex-grow: 3; } http://codepen.io/anon/pen/JEcBa

How to keep a flex item from overflowing due to its text? [duplicate]

UPDATE Adding code that works: .container { display: -webkit-flex; } .container>div:first-child{ white-space:nowrap; -webkit-order:1; -webkit-flex: 0 1 auto; /*important*/ text-overflow: ellipsis; overflow:hidden; min-width:0; /* new algorithm overrides the width calculation */ } .container > div:last-child { -webkit-flex: 1; -webkit-order:2; background: red; -webkit-flex:1 0 auto; /*important*/ } .container > div:first-child:hover{ white-space:normal; } <div class=”container”> <div>foo barfoo bar</div> … Read more

How to make a flex item not fill the height of the flex container? [duplicate]

The align-items, or respectively align-content attribute controls this behaviour. align-items defines the items’ positioning perpendicularly to flex-direction. The default flex-direction is row, therfore vertical placement can be controlled with align-items. There is also the align-self attribute to control the alignment on a per item basis. #a { display:flex; align-items:flex-start; align-content:flex-start; } #a > div { … Read more

How to stretch children to fill cross-axis?

The children of a row-flexbox container automatically fill the container’s vertical space. Specify flex: 1; for a child if you want it to fill the remaining horizontal space: .wrapper { display: flex; flex-direction: row; align-items: stretch; width: 100%; height: 5em; background: #ccc; } .wrapper>.left { background: #fcc; } .wrapper>.right { background: #ccf; flex: 1; } … Read more