I just stumbled across these two articles on clearing today, and it brought up some thoughts about how we use the clearfix mixins in Compass:
http://aloestudios.com/2009/12/goodbye-overflow-clearing-hack/
http://perishablepress.com/press/2009/12/06/new-clearfix-hack/
About +clearfix:
The overflow:hidden technique has its side-effects, but it covers many cases, and it’s short. There are two specific situations where this technique would cause you problems, where content needs to show outside the box:
* Suckerfish-style dropdowns
* box-shadow or other CSS3 transformations
About +pie-clearfix:
The content:after technique avoids these side-effects, but it’s verbose. Compass will cause a fair amount of repetition in the output, so it would be especially bad for such a promiscuous mixin to be used as the default all over the place. You can get around this by grouping clearfixed rules, basically as shown on the site above:
.check-one, .check-two
+pie-clearfix
The bottom line is that Compass has to make a compromise. The +pie-clearfix mixin would probably be a stronger default to avoid side-effects, but the simpler overflow:hidden method is preferable to avoid massive repetition. As long as you’re aware of the issues +clearfix can present, you can decide where to switch methods or plan ahead by grouping your +pie-clearfix rules together.
(Wolfr, some of this info might be worthwhile to add to the docs if you get to it before I have a chance!)
Andrew Vit
>> --~--~---------~--~----~------------~-------~--~----~
>> You received this message because you are subscribed to the Google Groups "Compass" group.
>> To post to this group, send email to compas...@googlegroups.com
>> To unsubscribe from this group, send email to compass-user...@googlegroups.com
>> For more options, visit this group at http://groups.google.com/group/compass-users?hl=en
>> -~----------~----~----~----~------~----~------~--~---
>>
>