Support nested attr() in modern syntax
Categories
(DevTools :: Inspector: Rules, enhancement, P2)
Tracking
(firefox152 fixed)
| Tracking | Status | |
|---|---|---|
| firefox152 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Steps to reproduce
- Set
layout.css.attr.enabledtotruein about:config - Open the attached test case
- Open the inspector
- Select the first
<h1>element (expand the pseudo element section if it wasn't already) - Select the second
<h1>element - Select the third
<h1>element
Here's the CSS rule:
h1::after {
content: attr(data-x raw-string, attr(data-y, "z"));
color: gold;
padding: 10px;
}
At step 4, the element does not have any attribute, the data-x is striked through, but there's no indication of what is used/dismissed in attr(data-y, "z").
Expected: data-y should be striked through
At step 5, the element only has a data-y attribute. the data-x is striked through, but there's no indication of what is used/dismissed in attr(data-y, "z").
Expected: "z" should be striked through
At step 6, the element has a data-x attribute. the data-x is not striked through, but after that, only the attr( element is striked through
Expected: the whole attr(data-y, "z") should be striked through
Basically, this should be handled similarly to how we handle var() where we can also have nested var() calls
(and I guess we can have a mix of nested var() and attr() and everything should work properly)
| Assignee | ||
Comment 1•3 months ago
|
||
there's discussion to enable modern attr() in Nightly, so we should look into this soon-ish
| Assignee | ||
Comment 2•22 days ago
|
||
When an attr() function is used in the fallback part for an upper attr() function,
we need to properly style it when the fallback isn't used.
Since we're working with the modern syntax here, we take this as an opportunity
to properly style the whole first parameter, type data included, when the attribute
isn't set.
Test cases are added to properly cover this.
Updated•22 days ago
|
Description
•