Skip to content

Commit b6a82a1

Browse files
committed
docs: update docs
1 parent c06a769 commit b6a82a1

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,15 @@ After: `{type: 'Selector', rules: [ {<RULE 1 DATA>}, {<RULE 2 DATA>} ]}`.
189189
[New type info.](docs/interfaces/AstRule.md)
190190

191191
1. Type changed: `rule` -> `Rule`.
192-
2. Prop changed: `id: string` -> `items: [{type: 'Id', name: '<ID>'}, ...]`. According to the CSS spec one rule may have more
193-
than 1 `id`, so `#root#root` is a valid selector.
192+
2. Prop changed: `id: string` -> `items: [{type: 'Id', name: '<ID>'}, ...]`. According to the CSS spec one rule may have
193+
more than 1 `id`, so `#root#root` is a valid selector.
194194
3. Prop renamed: `nestingOperator` -> `combinator`. A proper name according to CSS spec was chosen.
195195
4. Prop renamed: `rule` -> `nestedRule`. A proper name to indicate nesting was chosen.
196196
5. Prop changed: `tagName: string` -> `items: [TagName | WildcardTag, ...]`. Using explicit distinction between
197197
TagName (i.e. `div`) and WildcardTag (`*`), because tag name can also be `*` if escaped properly (`\*`).
198-
6. Prop changed: `attrs` -> `attributes`. Attribute type was changed, see below.
199-
7. Prop changed: `pseudos` -> `pseudoClasses`. There are pseudo-elements and pseudo-classes, now they are separated
200-
properly (there is a separate `pseudoElement` type). Pseudo class type was changed, see below.
198+
6. Prop changed: `attrs` -> `items: [<ATTRIBUTE>, ...]`. Attribute type was changed, see below.
199+
7. Prop changed: `pseudos` -> `items: [<PSEUDO CLASS>, ...]`. There are pseudo-elements and pseudo-classes, now they are
200+
separated properly (there is a separate `pseudoElement` type). Pseudo class type was changed, see below.
201201

202202
Before:
203203

docs/interfaces/SyntaxDefinition.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ___
121121

122122
### pseudoClasses
123123

124-
`Optional` **pseudoClasses**: ``false`` \| { `definitions?`: { `Formula`: `undefined` \| `string`[] ; `FormulaOfSelector`: `undefined` \| `string`[] ; `NoArgument`: `undefined` \| `string`[] ; `Selector`: `undefined` \| `string`[] ; `String`: `undefined` \| `string`[] ; `Substitution`: `undefined` \| `string`[] } ; `unknown?`: ``"accept"`` \| ``"reject"`` }
124+
`Optional` **pseudoClasses**: ``false`` \| { `definitions?`: { `Formula`: `undefined` \| `string`[] ; `FormulaOfSelector`: `undefined` \| `string`[] ; `NoArgument`: `undefined` \| `string`[] ; `Selector`: `undefined` \| `string`[] ; `String`: `undefined` \| `string`[] } ; `unknown?`: ``"accept"`` \| ``"reject"`` }
125125

126126
CSS Pseudo-classes.
127127

@@ -139,7 +139,7 @@ ___
139139

140140
### pseudoElements
141141

142-
`Optional` **pseudoElements**: ``false`` \| { `definitions?`: `string`[] ; `notation?`: ``"both"`` \| ``"singleColon"`` \| ``"doubleColon"`` ; `unknown?`: ``"accept"`` \| ``"reject"`` }
142+
`Optional` **pseudoElements**: ``false`` \| { `definitions?`: `string`[] \| { `NoArgument`: `undefined` \| `string`[] ; `Selector`: `undefined` \| `string`[] ; `String`: `undefined` \| `string`[] } ; `notation?`: ``"both"`` \| ``"singleColon"`` \| ``"doubleColon"`` ; `unknown?`: ``"accept"`` \| ``"reject"`` }
143143

144144
CSS Pseudo-elements.
145145

docs/modules.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,14 @@ const selector = ast.selector({
161161
ast.tagName({name: 'a'}),
162162
ast.id({name: 'user-23'}),
163163
ast.className({name: 'user'}),
164-
ast.pseudoClass({name: 'visited'})
164+
ast.pseudoClass({name: 'visited'}),
165+
ast.pseudoElement({name: 'before'})
165166
]
166167
})
167168
]
168169
});
169170

170-
console.log(render(selector)); // a#user-23.user:visited
171+
console.log(render(selector)); // a#user-23.user:visited::before
171172
```
172173

173174
#### Parameters

0 commit comments

Comments
 (0)