Open Bug 1854104 Opened 2 years ago Updated 1 month ago

Consider CSS attr() fallback

Categories

(DevTools :: Inspector: Rules, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: canadahonk, Unassigned)

References

(Blocks 1 open bug)

Details

Support for CSS attr()'s fallback (eg attr(foo, "fallback")) is being implemented and shipped in Bug 1448248. It should display okay in DevTools currently but it could possibly be improved (needs investigation). No other browsers implement or ship it at this time.

Spec: https://drafts.csswg.org/css-values-5/#attr-notation

We could do what is done for var() and display the value not being used in a "disabled"-grey color
CanadaHonk, can we detect that in javascript that the fallback is used?

Flags: needinfo?(oj)

No unfortunately, the spec doesn't add anything to DOM/etc exposing any fallback info afaik. I would be happy to add it but would likely need an upstream spec issue deciding how best to do so.

Flags: needinfo?(oj)

Well, we can detect it using element.hasAttribute(...) right?

Priority: -- → P3
Component: Inspector → Inspector: Rules
You need to log in before you can comment on or make changes to this bug.