W3C home > Mailing lists > Public > www-style@w3.org > October 2013

Re: [css-overflow-clipping] would 'overflow: clip' affect the layout of surrounding elements?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 13 Oct 2013 13:50:52 -0700
Message-ID: <CAAWBYDA_XujuvTAX6JXLYZ-a4DgNN_QVgjM4byR_0xqzTA_JPA@mail.gmail.com>
To: "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>
Cc: WWW Style <www-style@w3.org>
On Oct 13, 2013 6:06 AM, "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com> wrote:
>
> There was a question of "why 'overflow: hidden' establishes BFCs"[1]
> asked a while ago on this list and it was revealed - because 'overflow:
> hidden' has an invisible scrollbar, a fact that I doubt more than 5% of
> all Web developers know, and a float should not intrude into a
> scrollable element or otherwise the interaction is complicated.
>
> I've since wondered if we can have a 'overflow: hidden' equivalent that
> has no layout but painting effect (and that floats can intrude into it).
> Perhaps 'clip' was meant to achieve this but that property seems to
> already fail largely. Before reading into the draft, I thought this
> draft is about this, but the draft doesn't mention BFC...
>
> So... can we make 'overflow: clip' not establish a BFC, or is this
> already planned? The fact that 'overflow: hidden' affects layout is just
> really very confusing to Web developers. This behaivor has been the main
> way how Web developers get to known what a BFC is, I believe :)
>
> I don't know if spec-wise or implementation-wise not establing BFC
> contradicts the requirement to make the element a containling block
> root. If that's the case, I would like to requst another
> overflow-clipping value.

overflow: clip (or whatever I end up calling it) absolutely needs to
establish a BFC - if it doesn't, that immediately negates most of the
advantage, as the value is meant to "isolate" the layout of the element's
contents from the rest of the page. I didn't say anything about this
explicitly in the draft, because I think it's automatic for any non-visible
values.

There's nothing particularly wrong with having a value that just clips
without the possibility of scrolling, so that it doesn't need to establish
a BFC, is just not what I'm going for with my draft.

Assuming that clip-mask doesn't establish a BFC (I don't have easy access
to a real computer to check it right now) then it'll work for your
purposes, using the rectangle() function.

~TJ
Received on Sunday, 13 October 2013 20:51:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:03 UTC