Skip to content

[border-shape] Can border-shape trigger layout overflow? #14924

Backlog

Description

@smfr

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?

@noamr

Activity

  1. fantasai commented on Dec 2, 2026

    @fantasai
    Collaborator

    I think ink overflow is sufficient.

  2. noamr commented on Dec 2, 2026

    @noamr
    Collaborator

    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.

  3. smfr commented on Dec 2, 2026

    @smfr
    ContributorAuthor

    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.

  4. noamr commented on Dec 2, 2026

    @noamr
    Collaborator

    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.

  5. fantasai commented on Dec 2, 2026

    @fantasai
    Collaborator

    I think authors and users will be confused if we don't extend the hit testing area.

  6. noamr commented on Dec 2, 2026

    @noamr
    Collaborator

    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.

  7. bradkemper commented on Dec 5, 2026

    @bradkemper
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions