Open Bug 2048804 Opened 8 days ago Updated 3 days ago

Regression involving revert-layer, linear-gradient, custom properties

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 153
defect

Tracking

()

ASSIGNED
Tracking Status
firefox-esr140 --- unaffected
firefox152 --- unaffected
firefox153 --- unaffected
firefox154 + affected

People

(Reporter: kloretz+mozilla, Assigned: emilio)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(2 files)

Attached file regression.html

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

Steps to reproduce:

https://codepen.io/kirk-l/pen/PwWWVba?editors=1100

This unusual combination of styles is from me using revert-layer to style certain elements on a page with Tailwind CSS, and keep rest of the page's legacy styles from affecting this element.

Strangely, if I change the code any of these ways, the bug doesn't manifest:

  • Don't use all: revert-layer.
  • Inline the value of var(--tw-gradient-stops) instead of using a var.
  • Use the fallback of var(--tw-gradient-via-stops) directly. (Note this var doesn't exist.)
  • Inline the value of var(--tw-gradient-from) instead of using a var.
  • Don't register the @property --tw-gradient-from.

The code works as expected on Chrome 149 and Safari 26.5.

Actual results:

One box shows a linear-gradient background, but the box with the style all: revert-layer; does not show the background. This happens in Firefox 153 and Nightly (154)

Expected results:

Two identical boxes should appear. This works on Firefox 152.

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

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

:emilio, since you are the author of the regressor, bug 2046992, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)
Attached file More reduced test-case

Thanks. So the issue seems to be that we fail to detect the dependency on the registered color via the property fallback.

Assignee: nobody → emilio
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Swarup is currently working on bug 2042898 which should fix this, but I'll try to land something more surgical to fix the regression.

See Also: → 2042898

Set release status flags based on info from the regressing bug 2046992

[Tracking Requested - why for this release]:

My patch in bug 2021155 will fix this and adds a test, but we should make sure we don't ship this if that doesn't make it on time.

Depends on: 2021155
Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: