mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibWeb: Add :not pseudoclass to the CSS parser
The selector given in the :not() is stored in the SimpleSelector as a String.
This commit is contained in:
parent
78f3bad7e6
commit
1ab82afee6
3 changed files with 9 additions and 0 deletions
|
@ -579,6 +579,9 @@ public:
|
|||
simple_selector.pseudo_class = CSS::Selector::SimpleSelector::PseudoClass::Enabled;
|
||||
} else if (pseudo_name.equals_ignoring_case("checked")) {
|
||||
simple_selector.pseudo_class = CSS::Selector::SimpleSelector::PseudoClass::Checked;
|
||||
} else if (pseudo_name.starts_with("not", CaseSensitivity::CaseInsensitive)) {
|
||||
simple_selector.pseudo_class = CSS::Selector::SimpleSelector::PseudoClass::Not;
|
||||
simple_selector.not_selector = capture_selector_args(pseudo_name);
|
||||
} else {
|
||||
dbgln("Unknown pseudo class: '{}'", pseudo_name);
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue