Re: [w3ctag/design-reviews] CSS overflow: clip and overflow-clip-margin (#579)

Hi,

@atanassov and I took a look at this today in a TAG breakout.

> > Looked at this today with @hober and have two points of feedback:
> >
> > 1. It seems odd to constrain the overflow-clip-margin to the overflow: clip case. Wouldn't an additional margin also make sense in the overflow: hidden state?
>
> As the "overflow: hidden" case is still scrollable (programatically), I don't think it makes sense to support the overflow-clip-margin there.

I'm afraid I don't follow. Currently, there are two differences between `overflow: hidden` and `overflow: clip`:

1. `overflow: hidden` content is programmatically scrollable, whereas `overflow: clip` content is not
2. `overflow: clip` content is clipped to the overflow clip edge whereas `overflow: hidden` content is clipped to the padding box.

But what if you want content that is programmatically scrollable but clipped to the overflow clip edge? It seems like you have to choose between your content looking like you want but not behaving like you want (`overflow: clip`), or your content acting like you want but not looking like you want (`overflow: hidden`).

In the degenerate case of `overflow-clip-margin: 0;`, the overflow clip edge just is the padding box, so I doubt there would be much of a compat hit if we made `overflow: hidden` clip to the overflow clip edge.

There are also use cases for `overflow-clip-margin` for other values of `overflow`, such as `overflow: visible`. Suppose you wanted to slowly reveal more lines of text in a box. If `overflow-clip-margin` affected `overflow: visible` boxes, you could simply animate its value from `-somenumber` to `0` to reveal the rest of the text without causing weird layout things to happen and without having to create an extraneous opaque element to put on top of the text (& animate a translate transform of).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/579#issuecomment-839322127

Received on Wednesday, 12 May 2021 00:21:11 UTC