Consider supporting non-inherited custom properties
Categories
(DevTools :: General, defect, P3)
Tracking
(firefox122 fixed)
Tracking | Status | |
---|---|---|
firefox122 | --- | fixed |
People
(Reporter: zrhoffman, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
On this page: data:text/html,<meta charset=utf8><style>@property --b { syntax: '<color>'; inherits: false; initial-value: gold; }%20 main { --b: cyan; } div { background: var(--b); }%20 </style><main>hello<div>world</div></main><div>OUT</div>
Inspecting the "world" <div>
(that should have a gold
background, the initial value of --b
), we shouldn't see the --b: cyan
from the main
rule as being inherited.
We don't have a lot of information at the moment. We should add a property in the declaration object (that we compute on the server), that would indicate that we're dealing with a non-inherits custom property.
That means that we need to have a way to know when a custom property does not inherit. The spec doesn't seem to indicate any native way of doing this (e.g. there's no CSS.customProperties
that would return a list of all the PropertyDefinition
that were registered.
Updated•1 year ago
|
Assignee | ||
Comment 3•10 months ago
|
||
Since registered custom properties can be specified to not inherit,
DevTools need to retrieve this information in order to display accurate
data in the rules view.
The method signature is changed and now take a Document so we can lookup
the registry.
The existing test is updated with registered and unregistered custom properties.
Next patch in queue handles the impact in DevTools code.
Updated•10 months ago
|
Assignee | ||
Comment 4•10 months ago
|
||
Remove the specific callsites where we were making such assumption, and update
the calls to InspectorUtils.isInheritedProperty
to pass a document, since it's
now required to check if custom properties inherit.
Depends on D194629
Comment 5•10 months ago
|
||
Comment on attachment 9365369 [details]
Bug 1840987 - Make InspectorUtils.isInheritedProperty
check property definition in custom properties registry. r=zrhoffman.
Revision D194629 was moved to bug 1866707. Setting attachment 9365369 [details] to obsolete.
Assignee | ||
Comment 6•10 months ago
|
||
Depends on D194630
Depends on D194630
Comment 8•10 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bf44380b0901
https://hg.mozilla.org/mozilla-central/rev/e79bd3724b5b
Description
•