gavinmcfarland / flex-gap-polyfill

A PostCSS plugin to emulate flex gap using margins
https://gavinmcfarland.github.io/flex-gap-polyfill/
Creative Commons Zero v1.0 Universal
147 stars 6 forks source link

Width is wrong on container element who's parent container has gutters #1

Closed gavinmcfarland closed 6 years ago

gavinmcfarland commented 6 years ago

When a container is the child of another container the width is calculated incorrectly because the element in question is taking the gutter thickness for the parent containers children.

<div g_10gu>
    <div w_50%>Buy this item</div>
    <div w_50%>B</div>
    <div w_50%> <!-- width incorrectly calculated -->
        <div>A</div>
        <div>B</div>
        <div>C</div>
    </div>
</div>

The gutter thickness for this element needs to be reset to 0px.