Skip to content

Commit 3635d96

Browse files
committed
readme tweak
1 parent cd65780 commit 3635d96

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ Type and name selectors can be combined such as `Example[class]` and modifier se
106106
>**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]
107107
### Advanced Selectors
108108

109-
| Selector | Example | Description | Notes |
110-
| ------------------------- | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
111-
| **<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. |
109+
| Selector | Example | Description | Notes |
110+
| ------------------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
111+
| **<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. |
118118

119119
### Cascading
120120
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

Comments
 (0)