Closed
Bug 2014751
Opened 7 months ago
Closed 4 months ago
attr() doesn't strike through attribute name when attribute value is not valid for the specified syntax in type()
Categories
(DevTools :: Inspector: Rules, defect, P2)
DevTools
Inspector: Rules
Tracking
(firefox153 fixed)
RESOLVED
FIXED
153 Branch
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
Steps to reproduce
- Set
layout.css.attr.enabledtotruein about:config - Open the attached test case
- Inspect the blue background Hello element
Expected results
In the rule view, for the background-color declaration, in attr() the data-bg is strike through (because the data-bg attribute value is 12px, which doesn't match the type(<color>) we have
Actual results
The blue fallback is strike through
This styling mechanism only check for the presence of the attribute, but when the attr() is using a type(), we should check that the value does check the syntax.
We can probably use InspectorUtils.valueMatchesSyntax (see InspectorUtils.webidl)
Updated•7 months ago
|
Severity: -- → S3
Priority: -- → P2
| Assignee | ||
Comment 1•4 months ago
|
||
Check if the attribute value does match the definedd attr() attr-type parameter
to see if the attribute value or the fallback is being used.
In the attr() tooltip, indicate when the attribute value doesn't match the specified
type.
Updated•4 months ago
|
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/7cfad5d34cab
https://hg.mozilla.org/integration/autoland/rev/3cf027900442
[devtools] Handle modern attr() syntax in OutputParser. r=devtools-reviewers,ochameau.
Comment 3•4 months ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
status-firefox153:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
Updated•3 months ago
|
QA Whiteboard: [qa-triage-done-c154/b153]
You need to log in
before you can comment on or make changes to this bug.
Description
•