Combination of flex-shrink, flex-grow, flex-basis and min-width with wrap is not working as expected #261

Closed
opened 2016-11-25 10:00:28 -08:00 by woehrl01 · 0 comments
woehrl01 commented 2016-11-25 10:00:28 -08:00 (Migrated from github.com)

To following is not rendered as expected:

<div id="wrap_flex_grow_shrink_and_basis" style="width: 80px; flex-wrap: wrap; flex-direction:row;">
 <div style="flex-shrink: 0; flex-grow: 1; flex-basis: 40px; height: 20px; min-width: 50px;"></div>
 <div style="flex-shrink: 0; flex-grow: 1; flex-basis: 40px; height: 20px; min-width: 50px;"></div>
 <div style="flex-shrink: 0; flex-grow: 1; flex-basis: 40px; height: 20px; min-width: 50px;"></div>
 <div style="flex-shrink: 0; flex-grow: 1; flex-basis: 40px; height: 20px; min-width: 50px;"></div>
 <div style="flex-shrink: 0; flex-grow: 1; flex-basis: 40px; height: 20px; min-width: 50px;"></div>
</div>

failing test output:

[ RUN      ] CSSLayoutTest.wrap_flex_grow_shrink_and_basis
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(389): error: Value of: CSSNodeLayoutGetHeight(root)
  Actual: 60
Expected: 100
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(393): error: Value of: CSSNodeLayoutGetWidth(root_child0)
  Actual: 50
Expected: 80
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(396): error: Value of: CSSNodeLayoutGetLeft(root_child1)
  Actual: 50
Expected: 0
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(397): error: Value of: CSSNodeLayoutGetTop(root_child1)
  Actual: 0
Expected: 20
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(398): error: Value of: CSSNodeLayoutGetWidth(root_child1)
  Actual: 50
Expected: 80
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(402): error: Value of: CSSNodeLayoutGetTop(root_child2)
  Actual: 20
Expected: 40
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(403): error: Value of: CSSNodeLayoutGetWidth(root_child2)
  Actual: 50
Expected: 80
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(406): error: Value of: CSSNodeLayoutGetLeft(root_child3)
  Actual: 50
Expected: 0
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(407): error: Value of: CSSNodeLayoutGetTop(root_child3)
  Actual: 20
Expected: 60
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(408): error: Value of: CSSNodeLayoutGetWidth(root_child3)
  Actual: 50
Expected: 80
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(412): error: Value of: CSSNodeLayoutGetTop(root_child4)
  Actual: 40
Expected: 80
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(421): error: Value of: CSSNodeLayoutGetHeight(root)
  Actual: 60
Expected: 100
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(423): error: Value of: CSSNodeLayoutGetLeft(root_child0)
  Actual: 30
Expected: 0
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(425): error: Value of: CSSNodeLayoutGetWidth(root_child0)
  Actual: 50
Expected: 80
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(428): error: Value of: CSSNodeLayoutGetLeft(root_child1)
  Actual: -20
Expected: 0
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(429): error: Value of: CSSNodeLayoutGetTop(root_child1)
  Actual: 0
Expected: 20
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(430): error: Value of: CSSNodeLayoutGetWidth(root_child1)
  Actual: 50
Expected: 80
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(433): error: Value of: CSSNodeLayoutGetLeft(root_child2)
  Actual: 30
Expected: 0
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(434): error: Value of: CSSNodeLayoutGetTop(root_child2)
  Actual: 20
Expected: 40
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(435): error: Value of: CSSNodeLayoutGetWidth(root_child2)
  Actual: 50
Expected: 80
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(438): error: Value of: CSSNodeLayoutGetLeft(root_child3)
  Actual: -20
Expected: 0
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(439): error: Value of: CSSNodeLayoutGetTop(root_child3)
  Actual: 20
Expected: 60
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(440): error: Value of: CSSNodeLayoutGetWidth(root_child3)
  Actual: 50
Expected: 80
c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(444): error: Value of: CSSNodeLayoutGetTop(root_child4)
  Actual: 40
Expected: 80
[  FAILED  ] CSSLayoutTest.wrap_flex_grow_shrink_and_basis (19 ms)
To following is not rendered as expected: ``` <div id="wrap_flex_grow_shrink_and_basis" style="width: 80px; flex-wrap: wrap; flex-direction:row;"> <div style="flex-shrink: 0; flex-grow: 1; flex-basis: 40px; height: 20px; min-width: 50px;"></div> <div style="flex-shrink: 0; flex-grow: 1; flex-basis: 40px; height: 20px; min-width: 50px;"></div> <div style="flex-shrink: 0; flex-grow: 1; flex-basis: 40px; height: 20px; min-width: 50px;"></div> <div style="flex-shrink: 0; flex-grow: 1; flex-basis: 40px; height: 20px; min-width: 50px;"></div> <div style="flex-shrink: 0; flex-grow: 1; flex-basis: 40px; height: 20px; min-width: 50px;"></div> </div> ``` failing test output: ``` [ RUN ] CSSLayoutTest.wrap_flex_grow_shrink_and_basis c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(389): error: Value of: CSSNodeLayoutGetHeight(root) Actual: 60 Expected: 100 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(393): error: Value of: CSSNodeLayoutGetWidth(root_child0) Actual: 50 Expected: 80 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(396): error: Value of: CSSNodeLayoutGetLeft(root_child1) Actual: 50 Expected: 0 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(397): error: Value of: CSSNodeLayoutGetTop(root_child1) Actual: 0 Expected: 20 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(398): error: Value of: CSSNodeLayoutGetWidth(root_child1) Actual: 50 Expected: 80 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(402): error: Value of: CSSNodeLayoutGetTop(root_child2) Actual: 20 Expected: 40 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(403): error: Value of: CSSNodeLayoutGetWidth(root_child2) Actual: 50 Expected: 80 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(406): error: Value of: CSSNodeLayoutGetLeft(root_child3) Actual: 50 Expected: 0 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(407): error: Value of: CSSNodeLayoutGetTop(root_child3) Actual: 20 Expected: 60 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(408): error: Value of: CSSNodeLayoutGetWidth(root_child3) Actual: 50 Expected: 80 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(412): error: Value of: CSSNodeLayoutGetTop(root_child4) Actual: 40 Expected: 80 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(421): error: Value of: CSSNodeLayoutGetHeight(root) Actual: 60 Expected: 100 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(423): error: Value of: CSSNodeLayoutGetLeft(root_child0) Actual: 30 Expected: 0 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(425): error: Value of: CSSNodeLayoutGetWidth(root_child0) Actual: 50 Expected: 80 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(428): error: Value of: CSSNodeLayoutGetLeft(root_child1) Actual: -20 Expected: 0 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(429): error: Value of: CSSNodeLayoutGetTop(root_child1) Actual: 0 Expected: 20 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(430): error: Value of: CSSNodeLayoutGetWidth(root_child1) Actual: 50 Expected: 80 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(433): error: Value of: CSSNodeLayoutGetLeft(root_child2) Actual: 30 Expected: 0 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(434): error: Value of: CSSNodeLayoutGetTop(root_child2) Actual: 20 Expected: 40 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(435): error: Value of: CSSNodeLayoutGetWidth(root_child2) Actual: 50 Expected: 80 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(438): error: Value of: CSSNodeLayoutGetLeft(root_child3) Actual: -20 Expected: 0 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(439): error: Value of: CSSNodeLayoutGetTop(root_child3) Actual: 20 Expected: 60 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(440): error: Value of: CSSNodeLayoutGetWidth(root_child3) Actual: 50 Expected: 80 c:\users\lukas\dev\css-layout\tests\csslayoutflexwraptest.cpp(444): error: Value of: CSSNodeLayoutGetTop(root_child4) Actual: 40 Expected: 80 [ FAILED ] CSSLayoutTest.wrap_flex_grow_shrink_and_basis (19 ms) ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#261
No description provided.