Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Default clearfix implementation has undesirable side effects #974
I’m tired of seeing focus styles, etc., get unceremoniously clipped like this (see left and bottom edges):
I’m going through some code and replacing
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
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
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.