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

(2013/10/14 17:57), Alan Gresley wrote:
> On 14/10/2013 9:04 AM, Kang-Hao (Kenny) Lu wrote:
>> (2013/10/14 5:37), Tab Atkins Jr. wrote:
>>> On Oct 13, 2013 5:15 PM, "Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com>
>> wrote:
>>>>
>>>> (2013/10/14 4:50), Tab Atkins Jr. wrote:
>>>> 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%);
> 
> I confused. :-) Are you two now talking about something that it not
> overflow: clip (or whatever the desired behavior is) as proposed by Tab
> in this post and thread [2]?

Right. I jumped into this becuase I have in mind what 'overflow: hidden'
should have been if we can redo CSS and Tab introduced this feature as a
replacement of 'overflow: hidden'. They are different and perhaps I
would not care that much about Tab's new feature once that doens't
occupy 'overflow: clip' (Tab proposed 'isolation' or something).

But still, the draft mentions the idea of spliting the 'isolation'
feature to two and we could consider this split:

Part A: clip at the padding-edge without making it scrollable (and does
        not establish BFC)
Part B: establish BFC and style island and all that

and both get an 'overflow' valu, that's say, 'clip' (part A), 'island'
(part B), and 'isolate' (Part A + Part B).

>> 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.
> 
> Sometimes you will use overflow: hidden on a child element since it may
> not need to be rendered (e.g. wide image). There is much misuse of
> overflow by exploiting the fact that certain values for overflow create
> a BFC.

So I think this somehow shows that 'overflow: hidden' was a poor design
that should now be deprecated and replaced. The CSS langauge should be
able to express an author's intention and when you read an 'overflow:
hidden' line written by someone else, you don't know if the he/she
actually wants 'clip-path' or 'min-height'.

I am saying that I don't think 'clip-path: rectangle(0, 0, 100%, 100%)'
would be good enough to express the first intention given how long it is
(nor do I think 'clip-path: padding-box' is good). I want 'overflow: clip'.

>> Actually, the first is not right because 'rectangle' refers to the
>> border edge.
> 
> Is this the 'rectangle' of a containing block?

That's the 'rectangle()' function. Actually I am wrong, the origin of
'rectangle()' in 'clip-path' is the margin edge[1].

Though clipping at the border edge might or might not be a good change
for the new 'overflow: hidden' replacement. I don't know.

[1]
https://dvcs.w3.org/hg/FXTF/raw-file/default/masking/index.html#bounding-client-rect

> When I say something to that affect (being incomplete but yes, the specs
> should be somewhat coordinated), that is for the property 'overflow' and
> other properties and values in CSS2.1 and hopefully css3-overflow.
> Things are not quite defined so we don't have complete interoperability.
> Since I'm not sure what Tab is wanting in this spec, I can only answer
> your questions and give you a concept of what overflow is.
> 
> The best way to appreciate what overflow is is to consider what a
> veiwport is. A viewport or better a UA may render a scollbar and if it
> does, then the behavior is that of overflow: auto. It is also important
> to know that there is visible overflow and hidden overflow (not to be
> confused with overflow: visible or overflow: hidden). 

What are "visible overflow" and "hidden overflow" then? I am not
grasping the concept.

In any case, when an author writes 'overflow: hidden', I don't think
he/she wants a new viewport. Mostly he/she just wants to 'hide' the
'overflow' content, and creating a BFC is quite confusing.



Cheers,
Kenny
-- 
Web Specialist, Opera Sphinx Game Force, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/

Received on Monday, 14 October 2013 11:20:58 UTC