Skip to content

Pre-h1 page breaks are not suppressed in Windows 11 / Chrome 116 #6

@fraserbennett

Description

@fraserbennett

When printing a page, h1 elements have a page break inserted via css/custom.css:

  h1 {
    page-break-before: always;
  }

...but the first h1 element should not have the break inserted:

  h1:first-child {
    page-break-before: unset;
  }

Chrome 116 (at least on Windows 11) does not observe the h1:first-child rule, and merrily inserts a page break before the first h1 element. https://docs.bloomlibrary.org/installing-bloom/ provides a good example of this behavior.

On a possibly related note, https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-before says that page-break-before is deprecated, and that break-before should be used instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions