Skip to content

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

@woehrl01

Description

@woehrl01

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions