Re: [csswg-drafts] [css-overflow-3] how do overflow: clip/hidden combinations interact with rounded borders? (#7434)

The CSS Working Group just discussed `[css-overflow-3] how do overflow: clip/hidden combinations interact with rounded borders?`, and agreed to the following:

* `RESOLVED: border radius doesn't round the clipping region when mixing overflow: visible and clip`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> dbaron: I missed oriol's last comment, but I think it's relatively simple<br>
&lt;emilio> ... I noticed that the spec allows overflow to be clip in one axis but visible in other axis<br>
&lt;emilio> ... which is something that was introduced when clip was introduced<br>
&lt;emilio> ... when we introduced clip the question is how it interacts with rounding of borders<br>
&lt;emilio> ... I thought the simple question is that you clip in one axis but not on the other border radius has no effect<br>
&lt;emilio> ... oriol posted screenshots, and I'm not sure browsers are doing this new clip and visible behavior<br>
&lt;emilio> oriol: the behavior in browsers is... webkit has a bug where content is not painted... Chromium if it has overflow: visible clip as just clip only with non-zero radius<br>
&lt;emilio> ... so not continuous<br>
&lt;emilio> ... firefox applies the rounded clip to the bounding rectangle of the overflowing content<br>
&lt;emilio> ... In this particular case it looks kind of nice but it can be strange<br>
&lt;emilio> ... I think I'm leaning towards dbaron's proposal<br>
&lt;fantasai> +1 to dbaron's proposal<br>
&lt;flackr> +1 to dbaron's proposal, it makes sense that allowing visible overflow in the off-axis means there's no rounding<br>
&lt;emilio> smfr: I think I agree. The WebKit bug was fixed and now we behave like Chromium but I think that's just bugs, I'm ok with dbaron's proposal<br>
&lt;emilio> proposed resolution is that when clip and visible are specified, border radius has no effect<br>
&lt;fantasai> (on the content)<br>
&lt;fantasai> emilio: what if some corners have no radius and others do?<br>
&lt;dbaron> s/has no effect/doesn't cause rounded clipping of the contents/<br>
&lt;emilio> dbaron: we're not talking about whether border-radius has an effect, but whether it clips the contents<br>
&lt;emilio> ... border-radius with overflow: visible has an effect but doesn't clip<br>
&lt;emilio> ... my argument is that if you're not clipping in one axis you shouldn't clip to the border radius<br>
&lt;emilio> smfr: so basically everything should render as the first Firefox screenshot right?<br>
&lt;emilio> ... is that right if there's no content to clip?<br>
&lt;emilio> smfr: I'd like to see a test-case with something that overflows only on one side but doesn't fill the content box<br>
&lt;emilio> dbaron: I don't think any engine does what the spec says to me<br>
&lt;emilio> dbaron: oh wait, FF does it<br>
&lt;emilio> dbaron: I'll paste a modified test-case in the issue<br>
&lt;emilio> dbaron: https://github.com/w3c/csswg-drafts/issues/7434#issuecomment-1431669370<br>
&lt;emilio> dbaron: I think it should match up with what FF is doing on the later one<br>
&lt;emilio> ... because the inset rules for the clipping cause that to not have any rounding<br>
&lt;fantasai> emilio: I think I'm fine with dbaron's proposal<br>
&lt;fantasai> emilio: could do something more complicated, but unclear it would be useful<br>
&lt;TabAtkins> ok lol i finally looked at firefox's behavior with dbaron's increased overflow, that's silly<br>
&lt;TabAtkins> i see why that would happen but still<br>
&lt;emilio> Proposed resolution: border radius doesn't round the clipping region when mixing overflow: visible and clip<br>
&lt;emilio> dbaron: I should probably clarify that this is just a bugfix in the spec because nobody thought about it<br>
&lt;emilio> ... but I don't think there's any other sensible behavior here<br>
&lt;emilio> smfr: if you look in Firefox at the penultimate box on the last test-case I just posted (where I just shift the box) is that what you're proposing?<br>
&lt;emilio> astearns: so with this resolution we'd still round the border but the overflowing element isn't clipped<br>
&lt;fantasai> fantasai: afaict, all we're proposing here is that the border/background/etc are still rounded as normal, we just don't clip the content to the radius when there's overflow in one axis<br>
&lt;fantasai> (or both axes)<br>
&lt;fantasai> fantasai: this seems fine, what's the confusion?<br>
&lt;emilio> smfr: I just want to confirm that in my latest test-case FF is correct, except for the rounding on the left side<br>
&lt;emilio> dbaron: rithg<br>
&lt;emilio> right*<br>
&lt;emilio> smfr: sounds good<br>
&lt;emilio> +1 as well<br>
&lt;emilio> RESOLVED: border radius doesn't round the clipping region when mixing overflow: visible and clip<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7434#issuecomment-1431683702 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 15 February 2023 16:57:19 UTC