full site update

This commit is contained in:
2025-07-24 18:46:24 +02:00
parent bfe2b90d8d
commit 37a6e0ab31
6912 changed files with 540482 additions and 361712 deletions

View File

@@ -278,13 +278,16 @@ if (node.type === 'id') {
}
```
### `node.clone([opts])`
### `node.clone()`
Returns a copy of a node, detached from any parent containers that the
original might have had.
```js
const cloned = node.clone();
const cloned = parser.id({value: 'search'});
String(cloned);
// => #search
```
### `node.isAtPosition(line, column)`
@@ -392,18 +395,16 @@ Arguments:
### `container.atPosition(line, column)`
Returns the node at the source position `line` and `column`.
Returns the node at the source position `index`.
```js
// Input: :not(.foo),\n#foo > :matches(ol, ul)
selector.atPosition(1, 1); // => :not(.foo)
selector.atPosition(2, 1); // => \n#foo
selector.at(0) === selector.first;
selector.at(0) === selector.nodes[0];
```
Arguments:
* `line`: The line number of the node to return.
* `column`: The column number of the node to return.
* `index`: The index of the node to return.
### `container.index(node)`
@@ -786,7 +787,7 @@ has a method `error(message, options)` that returns an
error object. This method should always be used to raise
errors relating to the syntax of selectors. The options
to this method are passed to postcss's error constructor
([documentation](http://postcss.org/api/#container-error)).
([documentation](http://api.postcss.org/Container.html#error)).
#### Async Error Example