You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[border-shape] Can border-shape trigger layout overflow? #14924
The comments in #14918 suggest that areas of an element inside the outer edge of the border-shape, but outside the border box, hit-test. If they are clickable, this implies that they should create layout overflow, so they can be reached by scrolling.
Do we want to define that border-shape can trigger layout overflow?
Sorry the comment you are referring to suggests something else - to allow extending the border box of the element to the bounds of a shape with a yet to be specified opt in.
At the moment border-shape does not affect layout and does not expand the hit testing area.
I was referring to Elika's comment which suggests that the background fills the shape (possibly extending outside the border box) already per spec, without any changes to how the border-box is defined.
This issue is about whether the areas painted outside the border box are hit-testable, and contribute to visual or layout overflow.
I was referring to Elika's comment which suggests that the background fills the shape (possibly extending outside the border box) already per spec, without any changes to how the border-box is defined.
OK thanks for clarifying.
This issue is about whether the areas painted outside the border box are hit-testable, and contribute to visual or layout overflow.
Currently in blink they contribute to visual overflow only, as per spec (*though hit testing spec is notoriously unspecified), and are not part of hit testing. This is equivalent to clip-path extending the box. I don't think we can change this.
I think authors and users will be confused if we don't extend the hit testing area.
Sure but they would also be confused if the hit test area is outside getBoundingClientRect and that the background doesn't cover it. So I think the issue of border-shape that extends the border box should be handled holistically, rather than just address hit testing in isolation.
I'm kind of in favor of extending the border box to affect layout, at least in the block direction, in order to ensure there is no overlap with other elements in the column. That would work better with fallback too, without having to add margin only when it is supported.
On the other hand, I guess if you didn't want ink-only overflow, you could just keep the shape inside the box, and use shape-inside to prevent overlap with contents. So I'm okay with that too.
Activity
fantasai commentedon Dec 2, 2026
I think ink overflow is sufficient.
noamr commentedon Dec 2, 2026
Sorry the comment you are referring to suggests something else - to allow extending the border box of the element to the bounds of a shape with a yet to be specified opt in.
At the moment border-shape does not affect layout and does not expand the hit testing area.
smfr commentedon Dec 2, 2026
I was referring to Elika's comment which suggests that the background fills the shape (possibly extending outside the border box) already per spec, without any changes to how the
border-boxis defined.This issue is about whether the areas painted outside the border box are hit-testable, and contribute to visual or layout overflow.
noamr commentedon Dec 2, 2026
OK thanks for clarifying.
Currently in blink they contribute to visual overflow only, as per spec (*though hit testing spec is notoriously unspecified), and are not part of hit testing. This is equivalent to
clip-pathextending the box. I don't think we can change this.fantasai commentedon Dec 2, 2026
I think authors and users will be confused if we don't extend the hit testing area.
noamr commentedon Dec 2, 2026
Sure but they would also be confused if the hit test area is outside getBoundingClientRect and that the background doesn't cover it. So I think the issue of border-shape that extends the border box should be handled holistically, rather than just address hit testing in isolation.
bradkemper commentedon Dec 5, 2026
I'm kind of in favor of extending the border box to affect layout, at least in the block direction, in order to ensure there is no overlap with other elements in the column. That would work better with fallback too, without having to add margin only when it is supported.
On the other hand, I guess if you didn't want ink-only overflow, you could just keep the shape inside the box, and use shape-inside to prevent overlap with contents. So I'm okay with that too.