mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:37:44 +00:00
LibWeb: Implement the :is() selector
This lets us finally get rid of a FIXME in the default style sheet. :^)
This commit is contained in:
parent
88d218721b
commit
c148ed50bb
6 changed files with 37 additions and 21 deletions
|
@ -75,6 +75,7 @@ public:
|
|||
Disabled,
|
||||
Enabled,
|
||||
Checked,
|
||||
Is,
|
||||
Not,
|
||||
Active,
|
||||
};
|
||||
|
@ -84,7 +85,7 @@ public:
|
|||
// Only used when "pseudo_class" is "NthChild" or "NthLastChild".
|
||||
ANPlusBPattern nth_child_pattern;
|
||||
|
||||
SelectorList not_selector {};
|
||||
SelectorList argument_selector_list {};
|
||||
};
|
||||
PseudoClass pseudo_class {};
|
||||
PseudoElement pseudo_element { PseudoElement::None };
|
||||
|
@ -211,6 +212,8 @@ constexpr StringView pseudo_class_name(Selector::SimpleSelector::PseudoClass::Ty
|
|||
return "nth-child"sv;
|
||||
case Selector::SimpleSelector::PseudoClass::Type::NthLastChild:
|
||||
return "nth-last-child"sv;
|
||||
case Selector::SimpleSelector::PseudoClass::Type::Is:
|
||||
return "is"sv;
|
||||
case Selector::SimpleSelector::PseudoClass::Type::Not:
|
||||
return "not"sv;
|
||||
case Selector::SimpleSelector::PseudoClass::Type::None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue