You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,15 +106,15 @@ Type and name selectors can be combined such as `Example[class]` and modifier se
106
106
>**Note:** There is as of yet no concept of relations between tokens, so features like sibling and descendant selectors in CSS, for use cases like "select variables in a class named x" or "select a variable x defined right after class y" are **not** possible. [For this we would need to parse an actual AST, too much work for now]
|**<wildcard*match>**|`<foo*bar>`| select any token starting with 'foo' and ending with 'bar' | Multiple wildcards are allowed |
112
-
|**<*="include">**|`<*="foo">`| select any token which includes 'foo' | The Double quotes are technically optional but omitting them breaks the highlighting inside the rule. |
113
-
|**<^="start">**|`<^="foo">`| select any token starting with 'foo' ||
114
-
|**<$="end">**|`<$="bar">`| select any token ending with 'bar' ||
115
-
|**<"/regex/">**|`<"/foo(bar)?/">`| select any token matching the regex /foo(bar)?/ |`<"/regex/i">` is supported for case insensitive matching |
116
-
|**<*="match"=type>**|`<^="foo"=variable>, <$=bar=function:readonly>`| select variables starting with 'foo' and functions ending with 'bar'. | A regex match also needs to be prepended with `=` as in `<="/regex/"=type>` to work with type selectors |
117
-
|**selector::pseudoclass**|`foo::before, .getFoo::after`| style the 'before' pseudoclass of any token named foo and the 'after' pseudoclass of any function named 'getFoo' |Just as in regular CSS, pseudoclasses need `text-content`/`textContent` to be set.|
|**<wildcard*match>**|`<foo*bar>`| select any token starting with 'foo' and ending with 'bar' | Multiple wildcards are allowed |
112
+
|**<*="include">**|`<*="foo">`| select any token which includes 'foo' | The Double quotes are technically optional but omitting them breaks the highlighting inside the rule. |
113
+
|**<^="start">**|`<^="foo">`| select any token starting with 'foo' ||
114
+
|**<$="end">**|`<$="bar">`| select any token ending with 'bar' ||
115
+
|**<"/regex/">**|`<"/foo(bar)?/">`| select any token matching the regex /foo(bar)?/ |`<"/regex/i">` is supported for case insensitive matching |
116
+
|**<*="match"=type>**|`<^="foo"=variable>, <$=bar=function:readonly>`| select variables starting with 'foo' and functions ending with 'bar'. | A regex match also needs to be prepended with `=` as in `<="/regex/"=type>` to work with type selectors |
117
+
|**selector::pseudoclass**|`foo::before, .getFoo::light`| style the 'before' pseudo-class of any token named foo and the 'light' pseudo-class (styles only apply with light themes) of any function named 'getFoo' |the 'before' and 'after' pseudo-classes need the `text-content`/`textContent`property to be set. |
118
118
119
119
### Cascading
120
120
CHSS attempts to follow the same general rules of weight that CSS does, with more specific rules having higher weight: Direct name selectors trump matches and types which trump modifiers.
0 commit comments