Default clearfix implementation has undesirable side effects #974

Closed
alanhogan opened this Issue Jul 27, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@alanhogan

I’m tired of seeing focus styles, etc., get unceremoniously clipped like this (see left and bottom edges):

clipping

I’m going through some code and replacing @include clearfix with @include pie-clearfix which seems to have fewer side-effects.

Admittedly it is less concise, but it also doesn’t do, you know, that.

If I’m not missing anything, I’d like to suggest aliasing the clearfix mixin to pie-clearfix, and making the current clearfix available as ppk-clearfix or oh-clearfix.

@chriseppstein

This comment has been minimized.

Show comment Hide comment
@chriseppstein

chriseppstein Aug 6, 2012

Member

The current clearfix used to be pie-clearfix. I changed it to the overflow-based one.

In most cases, the simpler overflow-based clearfix works fine and in these cases uses far less output -- especially for nested selectors. In the other cases, users will see the clipping, read the docs, and choose a more bloated, but more effective mixin for their use case.

TL;DR I don't think it's better to use a bloated mixin as a default than to never see a bug.

Member

chriseppstein commented Aug 6, 2012

The current clearfix used to be pie-clearfix. I changed it to the overflow-based one.

In most cases, the simpler overflow-based clearfix works fine and in these cases uses far less output -- especially for nested selectors. In the other cases, users will see the clipping, read the docs, and choose a more bloated, but more effective mixin for their use case.

TL;DR I don't think it's better to use a bloated mixin as a default than to never see a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment