Closed
Bug 2017122
Opened 9 months ago
Closed 8 months ago
@container style() queries fail to resolve when the custom property is defined in a separate <style> block or external CSS file.
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 2014181
People
(Reporter: arby.dev.me, Unassigned)
Details
Steps to reproduce:
- Ensure
layout.css.style-queries.enabledistrue(standard in Nightly 149.0a1). - Load the following markup:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
.parent { --variant: tonal; }
</style>
<style>
.btn {
background-color: red;
@container style(--variant: tonal) {
background-color: green;
}
}
</style>
</head>
<body>
<div class="parent">
<button class="btn" type="button">Should be GREEN</button>
</div>
</body>
</html>
Actual results:
The button background is red. The style query fails to detect the inherited custom property because it was defined in a different style block. (Note: Moving both rules into a single <style> tag fixes the issue).
Expected results:
The button should be green. The style query should resolve the computed value of the custom property regardless of which stylesheet defined it.
Comment 1•9 months ago
|
||
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
Comment 2•8 months ago
|
||
I think this was fixed by bug 2014181. Button is green on latest nightly. Thanks for the report tho!
Status: UNCONFIRMED → RESOLVED
Closed: 8 months ago
Duplicate of bug: 2014181
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•