<div id="tertiary-content" class="clearfix">

otherwise it can't be background colored

Comments

Jeff Burnz’s picture

Category: bug » feature

Well if nothing is floated then its not needed so I'm not so sure this qualifies as a bug, maybe a design wtf if you are using skinr & the block width+float classes and want to set a background on the region, but for a themer its no biggie to either add or remove a clearfix.

I think it could be worth adding though - there used to be an inner div on each region that was clearfixed, but I took them out and so went the clearfix (in my obsessive cleanup of the output to remove all edge case HTML and classes).

I think I'll meditate on this for a day or two, I am loath to add anything extraneous but I can see the point with this one, its a definite wtf if you are not a themer.

duntuk’s picture

I'm on the fence about this one. I know it's super easy to add yourself, and I wouldn't even make this request myself, however looking at a perspective of novice css coder, this may be an issue.

And then again, there's the logical thought of cleaning up unnecessary or excessive classes/ids, where adding a 'clearfix' class on all sections would be contrary to what is trying to be accomplished there.

So now that i think about, there really is no single right answer to this...

But, I say just leave it out and maybe put a note in the README about adding your own 'clearfix' if you're using floated containers/layout... haha

Jeff Burnz’s picture

Yeah, I am on a similar page with you duntuk, its not just the one region, its ALL regions apart from sidebars that would need this, so that makes for a lot more classes in the markup that could be seldom used by many themes and themers.

I'm thinking we can document this - I mean at some point it certainly pays to learn about this stuff, clearing and all that, I can make a video which I kinda like doing :)

GiorgosK’s picture

I only suggested this is a bug since you have

      <div id="footer" class="clearfix">

but did not want to overanalyze

otherwise yes its a feature request that would be requested frequently

Jeff Burnz’s picture

I think as a compromise I'd be prepared to add a markup free method to starter.css, such as the overflow:hidden technique.

/* Markup free clearing */
#leaderboard,
#secondary-content,
#content-top,
#content-aside,
#content-bottom
#tertiary-content,
#footer,
#footer-region {
overflow:hidden;
}
GiorgosK’s picture

For the same reasons as above the

<div id="secondary-content" class="clearfix">

needed when putting http://drupal.org/project/nice_menus in the secondary content
in order for the container to be the same height as the menu

GiorgosK’s picture

While the implemented clearfix works well on most situations there might be a need for a cross browser clearfix as presented here

http://perishablepress.com/press/2009/12/06/new-clearfix-hack/

a situation in which the implemented clearfix fails to work for IE is when putting language block on the leaderboard with li's displayed inline the background of the leaderboard dissapears in IE

Jeff Burnz’s picture

Aha, one step ahead! The DEV version has such a clearfix improvement, including using a space instead of a period.

The overflow:hidden; method is well supported also, but can cause issues, as can any of the clearing methods.

In the DEV version also Skinr will add the clearfix class to the block:

<div class="block at-inline-menu clearfix block-edit-links">
Jeff Burnz’s picture

Status: Active » Closed (won't fix)

Cleaning up the issue queue - this is a won't fix for the original issue.