Skip to content

Supported Selectors

In it’s current iteration, Elevate CSS supports a subset of CSS selectors and pseudo-classes. As Elevate and it’s syntax continues to evolve, this list will be updated to add more features and support additional selectors and pseudo-classes.

Selector TypeExamplesDescriptionFramework Support
State Selectors:hover, :focus, :active, :visitedStyles elements based on user interactions (hover, focus, etc.).✅ Supported
:disabledApplies styles to disabled elements.✅ Supported
Structural Pseudo-classes:first-child, :last-child, :only-childTargets elements based on their structural position within the DOM.✅ Supported
:emptyMatches elements with no children or content.✅ Supported
:nth-child(n), :nth-of-type(n)Targets elements based on their position among siblings.❌ Unsupported
:has()Matches parents that contain specific children.❌ Unsupported
Form and Input States:checked, :required, :optionalTargets form inputs based on validation or attribute states.✅ Supported
:valid, :invalidApplies styles to valid or invalid form fields.✅ Supported
:in-range, :out-of-rangeMatches inputs within or outside a specified range.✅ Supported
Pseudo-elements::before, ::afterInserts content before or after an element’s actual content.✅ Supported
::first-letter, ::first-lineStyles the first letter or line of an element’s content.✅ Supported
::placeholder, ::selectionApplies styles to placeholder text or selected text.✅ Supported
Attribute Selectors[attr=value], [attr^=value]Matches elements based on attribute values (exact, prefix, suffix, etc.).❌ Unsupported
[attr*=value], [attr~=value]Matches elements where the attribute contains or is in a space-separated list.❌ Unsupported
Combinators>, +, ~Matches elements based on parent-child or sibling relationships.❌ Unsupported
Group Selectors:is(), :where()Matches elements using a list of selectors.❌ Unsupported
Target and Logical States:targetStyles elements based on URL fragment targeting (e.g., #section).❌ Unsupported
:lang(), :dir()Matches elements based on language or text direction.❌ Unsupported
Universal Selectors*Matches all elements.❌ Unsupported
Type Selectorsdiv, p, spanMatches all elements of a specific type.❌ Unsupported
ID Selectors#idMatches elements with a specific id.❌ Unsupported
Class Selectors.classMatches elements with a specific class.❌ Unsupported
Descendant Selectorsancestor descendantMatches elements nested within an ancestor.❌ Unsupported
Negation Selectors:not(selector)Matches elements that do not match a given selector.❌ Unsupported