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: Kang-Hao (Kenny) Lu <kanghaol@oupeng.com>
Date: Mon, 14 Oct 2013 06:04:34 +0800
Message-ID: <525B18F2.7070805@oupeng.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: WWW Style <www-style@w3.org>
(2013/10/14 5:37), Tab Atkins Jr. wrote:
> On Oct 13, 2013 5:15 PM, "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>
>> (2013/10/14 4:50), Tab Atkins Jr. wrote:
>>> 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.
>> I don't know if we can successfully extend 'clip' to non-abspos
>> elements and you are right that 'mask' doesn't establish a BFC.
> I said clip-path, not clip. The former doesn't have the latter's
> legacy works, but is otherwise identical.

You said clip-mask :), but OK, this is

  clip-path: rectangle(0, 0, 100%, 100%);

>> What I am asking is to make 'overflow: clip' (not this 'isolate'
>> feature) a shorthand of 'mask: image(white)'. No new functionality, but
>> I have doubts that the latter would take off. Also, with this, the
>> fallback is easier:
>>   overflow: hidden;
>>   overflow: clip;
>> I don't mean to conflate these two features, but I think this is worth
>> sorting out.
> We try to avoid doing that kind of weird shorthanding unless there's a very
> good reason, usually legacy related. It makes the language more difficult
> to understand, and it's bad enough as it is.

When I said "a shorthand of", I should have said "does what ... does",
not in the sense of "shorthand in property expansion". CSS, as a
powerful language, of course have lots of 'property A: value
A'/'property B: value B' pairs that do the same things.

When a Web developer uses 'overflow: hidden', as far as I can tell,
he/she has one of two possible intensions:

  * clip-path: rectangle(0, 0, 100%, 100%) / mask: image(white) ;
  * min-height: contain-floats;

These two are both too long to type, I think. I am suggesting we replace
the first with 'overflow: clip' and convey the message that we think
it's better than 'overflow: hidden' (do we think so? why and why not?).
I don't have a idea for the second. Perhaps it isn't a common case.

Actually, the first is not right because 'rectangle' refers to the
border edge.

I guess I agree with Alan in that the specs should be more coordinated.

Web Specialist, Opera Sphinx Game Force, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/
Received on Sunday, 13 October 2013 22:05:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:35 UTC