Selector
↔ CSS Syntax to define pattern to match HTMLElement
instances (& special states) in document to direct Style Rule
Source: w3c.github.io/csswg
aka CSS-Selector
Simple Selector
CSS Selector to match on single condition
Pseudo Selector
Pseudo-Element
Selector ::
postfix to match part of selected element(s)
Pseudo-Class
Simple Selector :
postfix to match special state of selected element(s)
References
Style Rule
↔ Ruleset with Selector & CSS Declaration blockPseudo-Element
↔ Selector::
postfix to match part of selected element(s)Descendent Selector
↔ Selector for Descendant Element (rel to other Element)Adjacent Sibling Selector
↔+
Selector for Sibling Element;E1 + E2 {}
where E2 is selector targetGeneral Sibling Selector
↔~
Selector less strict Adjacent Sibling Selector;E1 ~ E2 {}
where E2 is selector targetChild Selector
↔\>
Selector for direct Child ElementClass Selector
↔.myClass
Selector to match anyHTMLElement
withclass
attributeType Selector
↔ Selector to match all instance by typeofHTMLElement
node inDocument
Specificity
↔ Weighting Algorithm for Layout engine to choose which competing Selector Style Rule to apply toHTMLElement
List Selector
↔,
comma separated list of Selector to share & reuse Style RuleID Selector
↔#myID
Selector to match single unique ElementSimple Selector
↔ CSS Selector to match on single condition