Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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".
- The CSS community already calls knows this technique as a "clearfix".
- 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.
Comment | File | Size | Author |
---|---|---|---|
#3 | clearfix.patch | 21.69 KB | EclipseGc |
#1 | drupal-clearfix-371231.patch | 20.82 KB | JohnAlbin |
Comments
Comment #1
JohnAlbinHere's the patch that saves the kittens.
Comment #2
geerlingguy CreditAttribution: geerlingguy commentedI 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.
Comment #3
EclipseGc CreditAttribution: EclipseGc commentedRerolled 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
Comment #4
boombatower CreditAttribution: boombatower commentedNo occurrences of clear-block left after this patch. Seems logical.
Comment #5
JohnAlbinYes, 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.
Comment #6
webchickGreat. Committed to HEAD!
Please update the theme upgrade documentation.
Comment #7
webchickComment #8
add1sun CreditAttribution: add1sun commentedJust 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.
Comment #9
add1sun CreditAttribution: add1sun commentedaw cross-posted
Comment #10
webchickOi! Gimmie back mah tag! ;)
Thanks, add1sun. :)
Comment #11
webchickGRR! one. last. time.
Comment #12
JohnAlbinIs good? http://drupal.org/node/254940#clearfix