Selectors
September 30, 2025 ยท View on GitHub
CSS Selectors define which elements CSS rulesets will be applied to.
Structure for selectors
A selector object looks like this:
"General sibling selectors": {
"syntax": "A ~ B",
"groups": [
"Selectors"
],
"status": "standard"
}
The three properties shown above are all required:
syntax(string): The syntax of the selector (e.g.::afterwith two colons indicating a pseudo-element,:hoverwith one colon indicating a pseudo-class, orA ~ Bindicating a combinator).groups(array of strings): CSS is organized in modules like "CSS Values and Units". MDN organizes features in these groups as well โgroupsshould contain the name of the module(s) the selector is defined in.status(enum string): This is eitherstandard,nonstandard,experimentalorobsoletedepending 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/).