Open Bug 1979600 Opened 6 months ago Updated 6 months ago

Container query (size) in print does not evaluate properly

Categories

(Core :: Printing: Output, defect)

Firefox 142
defect

Tracking

()

People

(Reporter: andreas.lundblad, Unassigned)

Details

Attachments

(3 files)

Attached file media-query-print.html

Steps to reproduce:

This HTML should, according to my research, always render the text.

<html>
  <head>
    <style>
      .container {
          height: 1em;
          container-type: size;
      }

      .a {
          display: none;
          @container (height < 2em) {
              display: block;
          }
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="a">Shows on screen but not in print.</div>
    </div>
  </body>
</html>

Tested with version 142.0b3 (64-bit) (User agent: Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0)

Actual results:

The text does not render when printing the page. (But it renders on screen in Firefox and both on screen and in print on chrome.)

Expected results:

The text should always render.

The Bugbug bot thinks this bug should belong to the 'Core::Printing: Output' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Printing: Output
Product: Firefox → Core
(Moving to be more CQ-specific) Hrrm, the element receives a frame (Which would imply that the container query did update and gave it a style), but it looks like it's never actually reflowed, since as shown in the dump, their positions/sizes never get computed.
Attachment #9505509 - Attachment description: ok → Frame dump after container query update
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true

Removing direct declaration, nested style rules, etc to remove them as a factor. The issue still happens.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: