Skip to content

Commit 70fcaeb

Browse files
committed
Add tooltip explaining presence of :not() pseudo-class selector
1 parent a61a2dd commit 70fcaeb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

includes/validation/class-amp-validated-url-post-type.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,6 +2812,14 @@ static function ( $a, $b ) use ( $stylesheets ) {
28122812
$selector_html
28132813
);
28142814
}
2815+
$selector_html = preg_replace(
2816+
'/:not\((#_)+\)/',
2817+
sprintf(
2818+
'<abbr title="%s">$0</abbr>',
2819+
esc_attr__( 'Pseudo-class selector used to increase specificity for rule extracted from inline styles and/or properties with !important qualifiers.', 'amp' )
2820+
),
2821+
$selector_html
2822+
);
28152823

28162824
echo $selector_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
28172825

0 commit comments

Comments
 (0)