Open Bug 985242 Opened 6 years ago Updated 6 years ago

Make sure we have tests for honoring percent heights on stretched flex items in auto-height flex containers


(Core :: Layout, defect)

Not set




(Reporter: dholbert, Unassigned)



For "ISSUE 3" mentioned here...

Issue 3 is about handling percentage children of flex *items*.
There are two sets of changes that are required to handle this:

   a) Make stretched items in single-line flex items propagate
      "definiteness" of the flex container.
      So if a flex container has a definite cross-size, a
      stretched item is also considered to have a definite
      cross size, and its percentage children can resolve
      their sizes.
      We have a WG resolution on this part.

   b) Calculate a definite cross-size for auto-height flex
      containers by pretending percentage-height children
      are auto-height, and then redoing layout based on
      that flex container height.
      So if a row container is auto-height, we calculate a
      height based on its contents (as normal), but then if
      there are percentage-height children in its flex items,
      they get sized based on the row container's auto-height.
      This results in weird layout in some cases (mainly, if
      a non-100% child is the one defining the height of the
      flex container), but allows for better content-fitting
      in other cases.
      Note: IE implements this logic.
      We do not have a WG resolution on this part, and would
      like feedback from the WG and Flexbox implementors.

...I believe we already implement this behavior and that we have tests for (a) at least.  I'm not sure we have tests for (b). Filing this bug on making sure we've got tests for this behavior (assuming the WG resolves on it).
You need to log in before you can comment on or make changes to this bug.