CSS Selectors define which elements CSS rulesets will be applied to.
A selector object looks like this:
"General sibling selectors": {
"syntax": "A ~ B",
"groups": [
"Combinators"
],
"status": "standard"
}
The three properties shown above are all required:
syntax
(string): The syntax of the selector (e.g.::after
with two colons indicating a pseudo-element,:hover
with one colon indicating a pseudo-class, orA ~ B
indicating a combinator).groups
(array of strings): CSS is organized in modules like "CSS Values and Units". MDN organizes features in these groups as well —groups
should contain the name of the module(s) the selector is defined in.status
(enum string): This is eitherstandard
,nonstandard
,experimental
orobsolete
depending on the standardization status of the feature.
There is another property that is optional:
mdn_url
(string): a URL linking to the selector's page on MDN. This URL must omit the localization part of the URL (such asen-US/
).