https://drafts.csswg.org/selectors-4/#structure
-
A simple selector represents an element matched by a particular aspect.
-
A compound selector is a sequence of simple selectors that are not separated by a combinator.
-
Universal selector (*)
-
Type selectors (e.g. div, nav, ul li, .foo > span)
-
Non-namespaced class selectors (e.g. .button, .text-right, .foo > .bar)
-
Non-namespaced attribute selectors (e.g. [aria-checked], [data-foo], [type])
-
A pseudoselector that’s not within a compound selector (e.g. :hover, .foo > :checked)
These are appropriately called pseudo "elements" (not selectors) because they don't select any "real" element that exists on the page. This goes for these two, as well as the previous sections :first-letter and :first-line. Make sense? Like the first letter that ::first-letter selects isn't an element all to itself, it's just a part of an existing element, hence, pseudo element.
The double colons (::) make this distinction.
https://css-tricks.com/pseudo-class-selectors/
- Fixing scroll jank with composited layers (will-change: transform)