- From: Anton Prowse <prowse@moonhenge.net>
- Date: Wed, 30 Dec 2009 20:32:01 +0100
- To: www-style <www-style@w3.org>
- CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Niels Matthijs <niels.matthijs@internetarchitects.be>
Tab Atkins Jr. wrote: > On Wed, Dec 30, 2009 at 2:14 AM, Niels Matthijs > <niels.matthijs@internetarchitects.be> wrote: > >> So I was wondering whether we are trying to avoid using overflow:hidden for >> unrelated effects (more control over clearing and collapsing margins) or >> whether it would be good to have a break-overflow property, allowing a >> certain element to break out any overflow:hidden set on its parent? > > That's interesting, and potentially useful. Even when I've used > overflow:hidden for correct reasons - I really do want the overflow to > be hidden - I sometimes have children that I *do* want to 'overflow'. > Often these children are abspos and just positioned outside of the > block. > Note that an absolutely positioned element A is only affected (ie. clipped/scrolled-to) by an element O with non-'visible' overflow if A's containing block is O or some descendant of O, that is, if O (or some element between O and A) is positioned. I can conceive of times when you might want A to be immune to the overflow when O is A's containing block, but I don't really see a use case when A's containing block is a descendant of O. >> From what I know, it has a nice effect on breaking collapsing margins and clearing floats. > > Yup, though this isn't related to the overflow-ness per se; it's a > result of the fact that a non-auto value for overflow makes the block > into a BFC. > > Given that I use overflow:hidden for much more than this (float > management, mostly), this might also be useful for getting around > problems with that. There has been discussion about a property that > would create BFCs directly, though, which would allow me to stop using > overflow to hack this. Anyone know if there is any intention of this > making it into a draft soon? > I raised a discussion about "neutral" BFCs in [1]. This discussion moved on to considering individual properties/values which might directly and independently give rise to the four defining properties of BFCs (viz. preventing of margin collapsing, enclosing of dependent floats, providing scope for dependent clears, and not overlapping other BFCs including floats). I think it is still very much up for discussion as to which approach is preferred. Also, bear in mind that much of what we use BFCs for in real-world usage of CSS21 is hacky, as has already been mentioned. In deciding the way forward in CSS3, we must remember that we are working in the context of superior layout/template mechanisms which may well make obsolete many of our current hacky desires. [1] http://lists.w3.org/Archives/Public/www-style/2008May/0262.html Cheers, Anton Prowse http://dev.moonhenge.net
Received on Wednesday, 30 December 2009 19:33:06 UTC