Re: [css-flexbox] "flex: 1;" does the wrong thing in min-size constraint sizing

On 05/14/2013 11:12 AM, Tab Atkins Jr. wrote:
> Proposed solution: we add a new value, provisionally named
> "dont-shrink-me-bro" until someone comes up with something better.
> This value sticks around until used-value time, eventually being
> treated as 'min-content' if the element is sized under a min-size
> constraint, or 0 otherwise.  This becomes the new value for
> 'flex-basis' when it's omitted from the shorthand, so "flex: 1;"
> expands to "flex: 1 1 dont-shrink-me-bro;".

Isn't "0%" exactly the dont-shrink-me-bro value that you're looking for?

Generally, if a piece of content with "height: 0%" is being
shrinkwrapped, then the 0% height won't have anything to resolve
against, and so it ends up resolving to auto (effectively min-content)
instead of 0.

At least, that's how 0% behaves in e.g.:
  <!DOCTYPE html>
  <div style="height: 0%; border: 1px solid">foo</div>
in my local Opera, Chrome, and Firefox installs.


Received on Tuesday, 14 May 2013 23:44:32 UTC