mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Replace webkit meter-state pseudo-elements with pseudo-classes
This also implements the `:high-value` and `:low-value` that are in the spec. Same note as before about this being based on the very-drafty CSS Forms spec. In fact, some of this isn't even in that spec yet. Specifically, the `:suboptimal-value` and `:even-less-good-value` names are undecided and subject to change. However, it's clear that this is a pseudo-class situation, not a pseudo-element one, so I think this is still an improvement, as it allows styling of the `::fill` pseudo-element regardless of what state it is in. Relevant spec issue: https://github.com/openui/open-ui/issues/1130
This commit is contained in:
parent
1978578a72
commit
d5b9c39a98
Notes:
github-actions[bot]
2025-03-19 10:10:57 +00:00
Author: https://github.com/AtkinsSJ
Commit: d5b9c39a98
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3991
6 changed files with 44 additions and 34 deletions
|
@ -554,12 +554,6 @@ StringView Selector::PseudoElement::name(Selector::PseudoElement::Type pseudo_el
|
|||
return "fill"sv;
|
||||
case Selector::PseudoElement::Type::Thumb:
|
||||
return "thumb"sv;
|
||||
case Selector::PseudoElement::Type::MeterEvenLessGoodValue:
|
||||
return "-webkit-meter-even-less-good-value"sv;
|
||||
case Selector::PseudoElement::Type::MeterOptimumValue:
|
||||
return "-webkit-meter-optimum-value"sv;
|
||||
case Selector::PseudoElement::Type::MeterSuboptimumValue:
|
||||
return "-webkit-meter-suboptimum-value"sv;
|
||||
case Selector::PseudoElement::Type::Placeholder:
|
||||
return "placeholder"sv;
|
||||
case Selector::PseudoElement::Type::Selection:
|
||||
|
@ -595,12 +589,6 @@ Optional<Selector::PseudoElement> Selector::PseudoElement::from_string(FlyString
|
|||
return Selector::PseudoElement { Selector::PseudoElement::Type::Fill };
|
||||
} else if (name.equals_ignoring_ascii_case("thumb"sv)) {
|
||||
return Selector::PseudoElement { Selector::PseudoElement::Type::Thumb };
|
||||
} else if (name.equals_ignoring_ascii_case("-webkit-meter-even-less-good-value"sv)) {
|
||||
return Selector::PseudoElement { Selector::PseudoElement::Type::MeterEvenLessGoodValue };
|
||||
} else if (name.equals_ignoring_ascii_case("-webkit-meter-optimum-value"sv)) {
|
||||
return Selector::PseudoElement { Selector::PseudoElement::Type::MeterOptimumValue };
|
||||
} else if (name.equals_ignoring_ascii_case("-webkit-meter-suboptimum-value"sv)) {
|
||||
return Selector::PseudoElement { Selector::PseudoElement::Type::MeterSuboptimumValue };
|
||||
} else if (name.equals_ignoring_ascii_case("placeholder"sv)) {
|
||||
return Selector::PseudoElement { Selector::PseudoElement::Type::Placeholder };
|
||||
} else if (name.equals_ignoring_ascii_case("selection"sv)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue