Posted by JohnAlbin on February 8, 2009 at 11:49pm
7 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | theme system |
| Category: | feature request |
| Priority: | normal |
| Assigned: | JohnAlbin |
| Status: | closed (fixed) |
| Issue tags: | Needs Documentation |
Issue Summary
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.
Comments
#1
Here's the patch that saves the kittens.
#2
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.
#3
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
#4
No occurrences of clear-block left after this patch. Seems logical.
#5
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.
#6
Great. Committed to HEAD!
Please update the theme upgrade documentation.
#7
#8
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.
#9
aw cross-posted
#10
Oi! Gimmie back mah tag! ;)
Thanks, add1sun. :)
#11
GRR! one. last. time.
#12
Is good? http://drupal.org/node/254940#clearfix
#13
Automatically closed -- issue fixed for 2 weeks with no activity.