|
@@ -383,6 +383,12 @@ public:
|
|
|
auto pseudo_name = String::copy(buffer);
|
|
|
buffer.clear();
|
|
|
|
|
|
+
|
|
|
+ // Ignore for now, otherwise we produce a "false positive" selector
|
|
|
+ // and apply styles to the element itself, not its pseudo element
|
|
|
+ if (is_pseudo_element)
|
|
|
+ return {};
|
|
|
+
|
|
|
if (pseudo_name == "link")
|
|
|
simple_selector.pseudo_class = Selector::SimpleSelector::PseudoClass::Link;
|
|
|
else if (pseudo_name == "hover")
|
|
@@ -442,6 +448,9 @@ public:
|
|
|
PARSE_ASSERT(simple_selectors.size() < 100);
|
|
|
}
|
|
|
|
|
|
+ if (simple_selectors.is_empty())
|
|
|
+ return {};
|
|
|
+
|
|
|
return Selector::ComplexSelector { relation, move(simple_selectors) };
|
|
|
}
|
|
|
|