-
Notifications
You must be signed in to change notification settings - Fork 20
How do I specify a different subject for the selector?
Reversed Combinators are a classification of combinators that are the reverse of their original. They redirect the flow of selectors and combinators to travel up the node tree rather than down. Slick implements these by prepending ! to a selector or combinator.
CSS selectors are read from right to left, even reverse selectors.
The simple selector on the right defines the actual result that you are looking for. Everything further to the left filters down that list with more and more specific surrounding structure.
Note: We use the "!" quasi-namespace for our custom combinators to prevent collision with possible future standards.
Match a label
that has a direct child input[disabled]
.
Match a label
that is the direct parent of an input[disabled]
.
$label > input[disabled]
###Reverse Combinators
input[disabled] !> label
###:has Pseudo-class
label:has(input[disabled])
###Shaun Inman CSS Qualified Selectors
label < input[disabled]
Match all the paragraphs that are an ancestor of a paragraph
p ! p
Match all paragraphs that are direct previous siblings of another paragraph
p !+ p
Match all paragraphs that are previous siblings of another paragraph
p !~ p
table th:nth-child(3) strong > a
a !> strong ! th:nth-child(3) ! table
$table th:nth-child(3) strong > a