forked from mirrors/gecko-dev
Bug 1904285 - [devtools] Don't mark CSS variable declaration invalid in ::cue and highlight pseudo-elements. a=dmeehan.
Original Revision: https://phabricator.services.mozilla.com/D214546 Differential Revision: https://phabricator.services.mozilla.com/D217101
This commit is contained in:
parent
6e4921fb5d
commit
827ef8e4ce
3 changed files with 19 additions and 1 deletions
|
|
@ -768,7 +768,10 @@ class InactivePropertyHelper {
|
||||||
if (validator.invalidProperties) {
|
if (validator.invalidProperties) {
|
||||||
isRuleConcerned = validator.invalidProperties.includes(property);
|
isRuleConcerned = validator.invalidProperties.includes(property);
|
||||||
} else if (validator.acceptedProperties) {
|
} else if (validator.acceptedProperties) {
|
||||||
isRuleConcerned = !validator.acceptedProperties.has(property);
|
isRuleConcerned =
|
||||||
|
!validator.acceptedProperties.has(property) &&
|
||||||
|
// custom properties can always be set
|
||||||
|
!property.startsWith("--");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isRuleConcerned) {
|
if (!isRuleConcerned) {
|
||||||
|
|
|
||||||
|
|
@ -368,4 +368,11 @@ export default [
|
||||||
isActive: false,
|
isActive: false,
|
||||||
expectedMsgId: "inactive-css-cue-pseudo-element-not-supported",
|
expectedMsgId: "inactive-css-cue-pseudo-element-not-supported",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
info: "custom property is active on ::cue",
|
||||||
|
property: "--my-var",
|
||||||
|
tagName: "video",
|
||||||
|
rules: ["video::cue { --my-var: red; }"],
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -168,4 +168,12 @@ export default [
|
||||||
rules: ["span::target-text { background: red; }"],
|
rules: ["span::target-text { background: red; }"],
|
||||||
isActive: true,
|
isActive: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// accept custom properties
|
||||||
|
info: "custom property is active on ::target-text",
|
||||||
|
property: "--my-var",
|
||||||
|
tagName: "span",
|
||||||
|
rules: ["span::target-text { -my-var: red; }"],
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue