Open Bug 2047080 Opened 3 months ago Updated 1 month ago

Show warning when attr() is used without type for other properties than `content`

Categories

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

enhancement

Tracking

(Not tracked)

People

(Reporter: nchevobbe, Unassigned)

References

(Blocks 1 open bug)

Details

If you have the following HTML + CSS:

<div data-col=red>Hello</div>
div {
  color: attr(data-col);
}

the color: attr(data-col) declaration doesn't "work", as no type was provided in attr()
The declaration isn't invalid, but it would be nice if we could have a warning somewhere that makes it clear that it won't actually pick the color

(might be something similar to what we need for Bug 2006565)

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