postcss-utilities icon indicating copy to clipboard operation
postcss-utilities copied to clipboard

Potentially update clearfix util to be more modern

Open aarongeorge opened this issue 4 years ago • 2 comments

I've noticed that the clearfix util is using the display: table/block method, however there is a more modern approach which is to use display: flow-root.

A demo is here showing it off.

aarongeorge avatar Sep 13 '19 03:09 aarongeorge

Hi @aarongeorge, I've think that in that case it's not absolutely necessary to use a mixin because you have a single property solution. A possible use case is when you need to refactor your codebase and migrate the @util clearfix to that new solution. Also, it's not fully cross-browser yet, but I'll keep this issue open to review it later.

ismamz avatar Sep 27 '19 13:09 ismamz

@ismamz fair enough mate, just thought I'd leave a comment on it anyway. You make a valid point around the individual prop though

aarongeorge avatar Oct 01 '19 06:10 aarongeorge