:defined works

This commit is contained in:
Patrick Shaughnessy 2020-01-27 21:00:34 -05:00
parent 6d220d02de
commit 8ca4db2cd6
9 changed files with 52 additions and 7 deletions

View file

@ -278,6 +278,7 @@ pub enum NonTSPseudoClass {
Active,
AnyLink,
Checked,
Defined,
Disabled,
Enabled,
Focus,
@ -332,6 +333,7 @@ impl ToCss for NonTSPseudoClass {
Active => ":active",
AnyLink => ":any-link",
Checked => ":checked",
Defined => ":defined",
Disabled => ":disabled",
Enabled => ":enabled",
Focus => ":focus",
@ -371,6 +373,7 @@ impl NonTSPseudoClass {
Focus => ElementState::IN_FOCUS_STATE,
Fullscreen => ElementState::IN_FULLSCREEN_STATE,
Hover => ElementState::IN_HOVER_STATE,
Defined => ElementState::IN_DEFINED_STATE,
Enabled => ElementState::IN_ENABLED_STATE,
Disabled => ElementState::IN_DISABLED_STATE,
Checked => ElementState::IN_CHECKED_STATE,
@ -436,6 +439,7 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
"active" => Active,
"any-link" => AnyLink,
"checked" => Checked,
"defined" => Defined,
"disabled" => Disabled,
"enabled" => Enabled,
"focus" => Focus,