1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:22:07 +00:00

LibWeb: Implement :nth-of-type and :nth-last-of-type selectors :^)

This commit is contained in:
Sam Atkins 2022-02-26 13:53:13 +00:00 committed by Andreas Kling
parent 2e23cce557
commit a57128467a
5 changed files with 57 additions and 18 deletions

View file

@ -307,6 +307,10 @@ constexpr StringView pseudo_class_name(Selector::SimpleSelector::PseudoClass::Ty
return "last-of-type"sv;
case Selector::SimpleSelector::PseudoClass::Type::OnlyOfType:
return "only-of-type"sv;
case Selector::SimpleSelector::PseudoClass::Type::NthOfType:
return "nth-of-type"sv;
case Selector::SimpleSelector::PseudoClass::Type::NthLastOfType:
return "nth-last-of-type"sv;
case Selector::SimpleSelector::PseudoClass::Type::Disabled:
return "disabled"sv;
case Selector::SimpleSelector::PseudoClass::Type::Enabled: