Closed Bug 2085662 Opened 1 month ago Closed 1 month ago

@page at-rule CSS variable visibility issue

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 158
defect

Tracking

()

RESOLVED DUPLICATE of bug 1958511

People

(Reporter: y22spm, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:158.0) Gecko/20100101 Firefox/158.0

Steps to reproduce

A global CSS variable (e.g. declared under the :root CSS pseudo-class) is not visible when accessed under the @page CSS at-rule.

For example:

:root
{
    --layout: landscape;
}

@page
{
    size: var(--layout);
}

c.f. attached HTML/CSS example page that reproduces this behavior.

Actual results

When printing the page with Firefox, the orientation is portrait.

Expected results

The orientation should be landscape, as defined by the --layout variable.

Notes:

  1. On Chrome-based browsers, the orientation is indeed landscape
  2. On Firefox, a global variable is visible when accessed under a @page CSS at-rule—contrary to the @page CSS at-rule

The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, but is not confident enough to move the bug to that component.

Component: Untriaged → General
Status: UNCONFIRMED → RESOLVED
Closed: 1 month ago
Component: General → Layout: Text and Fonts
Duplicate of bug: 1958511
Product: Firefox → Core
Resolution: --- → DUPLICATE

@diannaS Thanks for spotting the duplicate 🙇

I'm not sure why 1958511 didn't show up when I searched for similar bug reports. Since it's still open, I'll continue the conversation there 🚀

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

Attachment

General

Creator:
Created:
Updated:
Size: