@@ -1112,6 +1112,54 @@ The Matches-any Pseudo-class: '':matches()''</h3>
11121112 <pre> *|*:matches(*:hover, *:focus) </pre>
11131113 </div>
11141114
1115+
1116+ <h3 id="negation">
1117+ The Negation Pseudo-class: '':not()''</h3>
1118+
1119+ The negation pseudo-class, <dfn id='negation-pseudo'>:not()</dfn> ,
1120+ is a functional pseudo-class taking a <a>selector list</a> as an argument.
1121+ It represents an element that is not represented by its argument.
1122+
1123+ Note: In Selectors Level 3,
1124+ only a single <a>simple selector</a> was allowed as the argument to '':not()'' .
1125+
1126+ Note: The specificity of the '':not()'' pseudo-class
1127+ is replaced by the specificity of the most specific selector in its argument;
1128+ thus it has the exact behavior of '':not(:matches(<var>argument</var>))'' .
1129+ See [[#specificity-rules]] .
1130+
1131+ Pseudo-elements cannot be represented by the negation pseudo-class;
1132+ they are not valid within '':not()'' .
1133+
1134+ <div class="example">
1135+ For example, the following selector matches all <a element>button</a> elements in an HTML document
1136+ that are not disabled.
1137+
1138+ <pre> button:not(\[DISABLED] ) </pre>
1139+
1140+ The following selector represents all but FOO elements.
1141+
1142+ <pre> *:not(FOO)</pre>
1143+
1144+ The following compound selector represents all HTML elements
1145+ except links.
1146+
1147+ <pre> html|*:not(:link):not(:visited)</pre>
1148+ </div>
1149+
1150+ As with '':matches()'' ,
1151+ default namespace declarations do not affect the <a>compound selector</a>
1152+ representing the <a>subject</a> of any selector
1153+ within a '':not()'' pseudo-class,
1154+ unless that compound selector contains
1155+ an explicit <a>universal selector</a> or <a>type selector</a> .
1156+ (See '':matches()'' for examples.)
1157+
1158+ Note: The '':not()'' pseudo-class allows useless selectors to be written.
1159+ For instance '':not(*|*)'' , which represents no element at all,
1160+ or ''div:not(span)'' , which is equivalent to ''div'' but with a higher specificity.
1161+
1162+
11151163<h3 id="zero-matches">
11161164The Specificity-adjustment Pseudo-class: '':something()''</h3>
11171165
@@ -1159,51 +1207,6 @@ The Specificity-adjustment Pseudo-class: '':something()''</h3>
11591207 Note: Future levels of Selectors may introduce an additional argument
11601208 to explicitly set the specificity of that instance of the pseudo-class.
11611209
1162- <h3 id="negation">
1163- The Negation Pseudo-class: '':not()''</h3>
1164-
1165- The negation pseudo-class, <dfn id='negation-pseudo'>:not()</dfn> ,
1166- is a functional pseudo-class taking a <a>selector list</a> as an argument.
1167- It represents an element that is not represented by its argument.
1168-
1169- Note: In Selectors Level 3,
1170- only a single <a>simple selector</a> was allowed as the argument to '':not()'' .
1171-
1172- Note: The specificity of the '':not()'' pseudo-class
1173- is replaced by the specificity of the most specific selector in its argument;
1174- thus it has the exact behavior of '':not(:matches(<var>argument</var>))'' .
1175- See [[#specificity-rules]] .
1176-
1177- Pseudo-elements cannot be represented by the negation pseudo-class;
1178- they are not valid within '':not()'' .
1179-
1180- <div class="example">
1181- For example, the following selector matches all <a element>button</a> elements in an HTML document
1182- that are not disabled.
1183-
1184- <pre> button:not(\[DISABLED] ) </pre>
1185-
1186- The following selector represents all but FOO elements.
1187-
1188- <pre> *:not(FOO)</pre>
1189-
1190- The following compound selector represents all HTML elements
1191- except links.
1192-
1193- <pre> html|*:not(:link):not(:visited)</pre>
1194- </div>
1195-
1196- As with '':matches()'' ,
1197- default namespace declarations do not affect the <a>compound selector</a>
1198- representing the <a>subject</a> of any selector
1199- within a '':not()'' pseudo-class,
1200- unless that compound selector contains
1201- an explicit <a>universal selector</a> or <a>type selector</a> .
1202- (See '':matches()'' for examples.)
1203-
1204- Note: The '':not()'' pseudo-class allows useless selectors to be written.
1205- For instance '':not(*|*)'' , which represents no element at all,
1206- or ''div:not(span)'' , which is equivalent to ''div'' but with a higher specificity.
12071210
12081211<h3 id='relational'>
12091212The Relational Pseudo-class: '':has()''</h3>
0 commit comments