Clearfix is an out-dated hack and unreliable cross-browser.

Regardless of the wisdom of it's use, it shouldn't be hardcoded into modules intended for general use with a variety of themes - it should be left to the theming layer and template customisation provided by end developers.

Comments

markedup’s picture

Agreed; .clearfix makes assumptions around layouts that can interfere with more modern approaches to CSS.

In these instances, the .clearfix hack is also prone to actually causing immovable layout problems in older, less-capable browsers (you can guess which).

And by "immovable" I mean that you can't later remove junk added by content instructions once that class has already been processed by the browser. You can just add more junk to it.

The simplest solution would be to make .clearfix an optional "base" class, not a mandatory one. That way you won't break existing layouts for people who still rely on it, but also don't foist it onto those who no longer need it (or want it).

tsi’s picture

I agree.
What are you suggesting ?
I guess - remove all clearfixes from templates and apply them with sasson's @include clear ?

mint5auce’s picture

As long as the clearfix class is removed from base html I'd be a happy developer :)

erutan’s picture

@include clear seems like an improvement to me.

tsi’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit cb0008d on 7.x-2.x, 7.x-3.x, PHPSass, 7.x-3.x-Assetic, 7.x-3.x-susy by tsi:
    Issue #1512202 by mint5auce, markedup, erutan : Remove clearfix from...