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
143 stars 6 forks source link

How to improve percentage gap for flex container items with no explicit width #12

Closed gavinmcfarland closed 3 years ago

gavinmcfarland commented 6 years ago

Flex container items which are not 100% width of the container cannot calculate the correct negative margin because they don't know the computed width of the element.

One way to fix this could be to change the technique used on container items with percentage gaps and use technique of turning off margin on first child with no negative margins on container.