Drupal uses a CSS class called "clear-block" that allows a container DIV to always enclose any floated children elements.

The CSS community calls this class "clearfix". I'm not sure why Drupal decided to change that. A quick Google search shows that there are over 167,000 references to clearfix css, but only about 1000 references to clear-block.

So, I think we should change "clear-block" to "clearfix".

  1. The CSS community already calls knows this technique as a "clearfix".
  2. Drupal already has too many "blocks". "clear-block" adds to the namespace collision because it sounds like it has to do with Drupal's block system.
CommentFileSizeAuthor
#3 clearfix.patch21.69 KBEclipseGc
#1 drupal-clearfix-371231.patch20.82 KBJohnAlbin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JohnAlbin’s picture

Status: Active » Needs review
FileSize
20.82 KB

Here's the patch that saves the kittens.

geerlingguy’s picture

I like it - we'll need to make sure this gets into the theming handbook here on d.o as well.

On second glance, I still can't see any problems. It applies and all is well here.

EclipseGc’s picture

FileSize
21.69 KB

Rerolled against current head. I tested this out and things seem pretty good, but was not applied against two additional files.

modules/field/field.form.inc.orig (?? this doesn't appear in my patch, doesn't get unpatched when I reverse it, gets repopulated by cvs when I delete it, I assume this is some sort of file that's purely archival?)
themes/chameleon/chameleon.theme (is this getting removed in 7?)

Other than that it all looks good. I would have marked to RTBC otherwise.

Eclipse

boombatower’s picture

Status: Needs review » Reviewed & tested by the community

No occurrences of clear-block left after this patch. Seems logical.

JohnAlbin’s picture

Yes, my patch did miss the chameleon.theme file. Good catch, EclipseGC! I'll be more careful when letting BBEdit do global search and replaces. Note to self: click the "File Type: All File Types" toggle.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Great. Committed to HEAD!

Please update the theme upgrade documentation.

webchick’s picture

Issue tags: +Needs documentation
add1sun’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs documentation

Just want to give a +1 to changing the name here. It is an odd drupalism that is just another bump on the road. Using the common terminology for this standard design fix makes way more sense to me.

add1sun’s picture

Status: Reviewed & tested by the community » Needs work

aw cross-posted

webchick’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: +Needs documentation

Oi! Gimmie back mah tag! ;)

Thanks, add1sun. :)

webchick’s picture

Status: Reviewed & tested by the community » Needs work

GRR! one. last. time.

JohnAlbin’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -Needs documentation

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