Skip to content

[css-break] Add an ability to hide elements when they adjoin a page/column break #12737

@Psychpsyo

Description

@Psychpsyo

So I have a bunch of sections, separated by <hr>s. The <hr>s are there to visibly separate the content but they look weird if they land right before or right after a page or column break. It would be nice if there were a CSS property that I could use to tell the browser that these dividers should not be rendered when they are the first thing before or after a page or column break. Essentially a conditional display: none.

Also, break-before: avoid and break-after: avoid don't work for my use-case, since the items that are being separated have break-inside: avoid, so any valid break point ends up right before or after one of these <hr>s.

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