@@ -297,6 +297,9 @@ impl<'a, 'o, 'i> parcel_selectors::parser::Parser<'i> for SelectorParser<'a, 'o,
297297
298298 "view-transition" => ViewTransition ,
299299
300+ "grammar-error" => GrammarError ,
301+ "spelling-error" => SpellingError ,
302+
300303 _ => {
301304 if !name. starts_with( '-' ) {
302305 self . options. warn( loc. new_custom_error( SelectorParseErrorKind :: UnsupportedPseudoElement ( name. clone( ) ) ) ) ;
@@ -966,6 +969,10 @@ pub enum PseudoElement<'i> {
966969 PickerIcon ,
967970 /// The [::checkmark](https://drafts.csswg.org/css-forms-1/#styling-checkmarks-the-checkmark-pseudo-element) pseudo element.
968971 Checkmark ,
972+ /// The [::grammar-error](https://drafts.csswg.org/css-pseudo/#selectordef-grammar-error) pseudo element.
973+ GrammarError ,
974+ /// The [::spelling-error](https://drafts.csswg.org/css-pseudo/#selectordef-spelling-error) pseudo element.
975+ SpellingError ,
969976 /// An unknown pseudo element.
970977 Custom {
971978 /// The name of the pseudo element.
@@ -1233,6 +1240,8 @@ where
12331240 }
12341241 PickerIcon => dest. write_str ( "::picker-icon" ) ,
12351242 Checkmark => dest. write_str ( "::checkmark" ) ,
1243+ GrammarError => dest. write_str ( "::grammar-error" ) ,
1244+ SpellingError => dest. write_str ( "::spelling-error" ) ,
12361245 Custom { name : val } => {
12371246 dest. write_str ( "::" ) ?;
12381247 return dest. write_str ( val) ;
@@ -1947,6 +1956,8 @@ pub(crate) fn is_compatible(selectors: &[Selector], targets: Targets) -> bool {
19471956 PseudoElement :: PickerFunction { identifier : _ } => Feature :: Picker ,
19481957 PseudoElement :: PickerIcon => Feature :: PickerIcon ,
19491958 PseudoElement :: Checkmark => Feature :: Checkmark ,
1959+ PseudoElement :: GrammarError => Feature :: GrammarError ,
1960+ PseudoElement :: SpellingError => Feature :: SpellingError ,
19501961 PseudoElement :: Custom { name : _ } | _ => return false ,
19511962 } ,
19521963
0 commit comments