diff --git a/.devcontainer.json b/.devcontainer.json
new file mode 100644
index 000000000..55d59b674
--- /dev/null
+++ b/.devcontainer.json
@@ -0,0 +1,3 @@
+{
+ "image": "ghcr.io/ai/devcontainer:latest"
+}
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..c6c8b3621
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 000000000..0aaa2efe2
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,65 @@
+# Contributing Guide to PostCSS
+
+If you want to contribute to PostCSS, there are a few things that you should
+be familiar with.
+
+## Adding Your Plugin to the List
+
+If you created or found a plugin and want to add it to the PostCSS plugins list
+follow these simple steps:
+
+PR should not change plugins defined in README — it only contains favorite plugins
+moderated by the PostCSS author.
+
+Plugins submitted by the community are located in [`docs/plugins`].
+
+- **Keep plugins ordered**
+
+ Be sure that a plugin is not already present and find a suitable position
+ for it in alphabetical order.
+ However plugins with `postcss-` prefix should come first.
+
+- **Check spelling**
+
+ Before submitting a PR make sure the spelling check is passing.
+ To run the check use `npm test`.
+ If it fails with an unknown word error, add it as a word
+ to `.yaspellerrc` dictionary.
+
+- **Check PostCSS plugin guidelines**
+
+ The suggested plugin should match plugin [guidelines].
+
+* **Provide link to suggested plugin**
+
+ Make sure your pull request description contains a link to the plugin
+ you want to add.
+
+[`docs/plugins`]: https://github.com/postcss/postcss/blob/main/docs/plugins.md
+[guidelines]: https://github.com/postcss/postcss/blob/main/docs/guidelines/plugin.md
+
+## TypeScript Declaration Improvements
+
+If you found a bug or want to add certain improvements to types declaration file:
+
+- **Check current TypeScript styling**
+
+ Be sure that your changes match TypeScript styling rules defined in typings file.
+ - We use classes for existing JS classes like `Stringifier`.
+ - Namespaces used for separating functions related to the same subject.
+ - Interfaces used for defining custom types.
+
+ Make sure you read through declaration file writing [best practices]
+ by the TypeScript team.
+
+[best practices]: https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html
+
+## Core Development
+
+If you want to add new features or fix existing issues
+
+- **Become familiar with PostCSS architecture**
+
+ For a gentle intro to PostCSS architecture look through our [guide].
+
+[guide]: https://github.com/postcss/postcss/blob/main/docs/architecture.md
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 000000000..91de44399
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,3 @@
+open_collective: postcss
+tidelift: npm/postcss
+github: ai
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 000000000..7787390f0
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,41 @@
+name: Release
+on:
+ push:
+ tags:
+ - '*'
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ id-token: write
+ steps:
+ - name: Checkout the repository
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+ - name: Clean npm package
+ uses: ai/clean-npm-project@3f664d1a83e04a2be737b7ad4e0b5a4e1b7dbc08 # v0.3.1
+ with:
+ clean-docs: true
+ - name: Install Node.js
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
+ with:
+ node-version: 26
+ package-manager-cache: false
+ - name: Publish npm package
+ run: npm stage publish
+ working-directory: cleaned-project/
+ release:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - name: Checkout the repository
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+ - name: Copy CHANGELOG.md to Releases
+ uses: ai/copy-changelog-to-release@a6dc825c34575add2da2060796794f7b84894628 # v0.2.0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 000000000..743c0db40
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,104 @@
+name: Test
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+permissions:
+ contents: read
+jobs:
+ full:
+ name: Node.js Latest Full
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout the repository
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+ - name: Install Node.js & pnpm
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ with:
+ version: 11
+ runtime: node@26
+ - name: Install dependencies
+ run: pnpm ci
+ - name: Run tests
+ run: pnpm test
+ short:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node:
+ - 24
+ - 22
+ name: Node.js ${{ matrix.node }} Quick
+ steps:
+ - name: Checkout the repository
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+ - name: Install Node.js & pnpm
+ uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
+ with:
+ version: 11
+ runtime: node@${{ matrix.node }}
+ - name: Install dependencies
+ run: pnpm ci
+ - name: Install dependencies
+ run: pnpm ci --ignore-scripts
+ - name: Run unit tests
+ run: pnpm run unit
+ old:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node:
+ - 20
+ - 18
+ - 16
+ - 14
+ - 12
+ - 10
+ name: Node.js ${{ matrix.node }} Quick
+ steps:
+ - name: Checkout the repository
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+ - name: Install pnpm
+ uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
+ with:
+ version: 3
+ env:
+ ACTIONS_ALLOW_UNSECURE_COMMANDS: true
+ - name: Install Node.js ${{ matrix.node }}
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
+ with:
+ node-version: ${{ matrix.node }}
+ - name: Install dependencies
+ run: pnpm install --ignore-scripts
+ - name: Downgrade TypeScript
+ run: pnpm install typescript@4 --ignore-scripts
+ - name: Run unit tests
+ run: pnpm run old
+ windows:
+ runs-on: windows-latest
+ name: Windows Quick
+ steps:
+ - name: Checkout the repository
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+ - name: Install pnpm
+ uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
+ with:
+ version: 11
+ - name: Install Node.js LTS
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
+ with:
+ node-version: 26
+ cache: pnpm
+ - name: Install dependencies
+ run: pnpm install --ignore-scripts
+ - name: Run unit tests
+ run: pnpm run unit
diff --git a/.gitignore b/.gitignore
index d2dc35e82..3030054ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,6 @@
-.DS_Store
-*~
-
node_modules/
-.bundle/
-
-benchmark/results/
-benchmark/cache/
-build/
-origin.css
-fail.css
+coverage/
-postcss.js
+docs/api/index.html
+docs/api/assets/
diff --git a/.npmignore b/.npmignore
index 21e306af4..9439f8b9d 100644
--- a/.npmignore
+++ b/.npmignore
@@ -1,16 +1,7 @@
-.gitignore
-
-node_modules/
-
-benchmark/
-build/
-tasks/
-
+coverage/
test/
-.travis.yml
-origin.css
-fail.css
-postcss.js
-gulpfile.js
-logo.svg
+docs/
+tsconfig.json
+eslint.config.mjs
+pnpm-workspace.yaml
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index ffb8b3996..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - iojs
- - "0.12"
- - "0.10"
diff --git a/API.md b/API.md
deleted file mode 100644
index 57a9644d2..000000000
--- a/API.md
+++ /dev/null
@@ -1,1296 +0,0 @@
-# PostCSS API
-
-* [postcss function](#postcss-function)
-* [PostCSS class](#postcss-class)
-* [Result class](#result-class)
-* [Vendor module](#vendor-module)
-* [List module](#list-module)
-* [Input class](#input-class)
-* [Nodes common methods](#nodes-common-methods)
-* [Containers common methods](#containers-common-methods)
-* [Root node](#root-node)
-* [AtRule node](#atrule-node)
-* [Rule node](#rule-node)
-* [Declaration node](#declaration-node)
-* [Comment node](#comment-node)
-
-## `postcss` function
-
-The `postcss` function is the main entry point for PostCSS.
-
-```js
-var postcss = require('postcss');
-```
-
-### `postcss(plugins)`
-
-Returns a new `PostCSS` instance that will apply `plugins`
-as CSS processors.
-
-```js
-postcss([autoprefixer, cssnext, cssgrace]).process(css).css;
-```
-
-You can also set plugins with the [`PostCSS#use`] method.
-
-See [`PostCSS#use`] below for details about plugin formats.
-
-### `postcss.parse(css, opts)`
-
-Parses source `css` and returns a new `Root` node, which contains
-the source CSS nodes.
-
-```js
-// Simple CSS concatenation with source map support
-var root1 = postcss.parse(css1, { from: file1 });
-var root2 = postcss.parse(css2, { from: file2 });
-root1.append(root2).toResult().css;
-```
-
-Options:
-
-* `from`: the path to the source CSS file. You should always set `from`,
- because it is used in map generation and in syntax error messages.
-* `safe`: enable [Safe Mode], in which PostCSS will try
- to fix CSS syntax errors.
-* `map`: an object of [source map options].
- Only `map.prev` is used in `parse`.
-
-### `postcss.root(props)`
-
-Creates a new [`Root` node].
-
-```js
-postcss.root({ after: '\n' }).toString() //=> "\n"
-```
-
-### `postcss.atRule(props)`
-
-Creates a new [`AtRule` node].
-
-```js
-postcss.atRule({ name: 'charset' }).toString() //=> "@charset"
-```
-
-### `postcss.rule(props)`
-
-Creates a new [`Rule` node].
-
-```js
-postcss.rule({ selector: 'a' }).toString() //=> "a {\n}"
-```
-
-### `postcss.decl(props)`
-
-Creates a new [`Declaration` node].
-
-```js
-postcss.decl({ prop: 'color', value: 'black' }).toString() //=> "color: black"
-```
-
-### `postcss.comment(props)`
-
-Creates a new [`Comment` node].
-
-```js
-postcss.comment({ text: 'test' }).toString() //=> "/* test */"
-```
-
-## `PostCSS` class
-
-A `PostCSS` instance contains plugins to process CSS. You can create
-one `PostCSS` instance, initialize its plugins, and then use that instance
-on many CSS files.
-
-```js
-var processor = postcss([autoprefixer, cssnext, cssgrace]);
-processor.process(css1).css;
-processor.process(css2).css;
-```
-
-### `p.use(plugin)`
-
-Adds a plugin to be used as a CSS processor.
-
-```js
-var processor = postcss();
-processor.use(autoprefixer).use(cssnext).use(cssgrace);
-```
-
-Plugins can also be added by passing them as arguments when creating
-a `postcss` instance (cf. [`postcss(plugins)`]).
-
-Plugins can come in three formats:
-
-1. A function. PostCSS will pass the function a [`Root` node]
- as the first argument.
-2. An object with a `postcss` method. PostCSS will use that method
- as described in #1.
-3. Another `PostCSS` instance. PostCSS will copy plugins
- from that instance to this one.
-
-Plugin functions should mutate the passed `Root` node and return nothing,
-or return a new `Root` node.
-
-```js
-processor.use(function (css) {
- css.prepend({ name: 'charset', params: '"UTF-8"' });
-});
-processor.use(function (css) {
- return postcss.root();
-});
-```
-
-### `p.process(css, opts)`
-
-This is the main method of PostCSS. It will parse the source CSS
-and create a [`Root` node]; send this `Root` to each plugin successively,
-for transformations; and then return a `Result` instance created
-from the transformed `Root`.
-
-```js
-var result = processor.process(css, { from: 'a.css', to: 'a.out.css' });
-```
-
-Input CSS formats are:
-
-* A string of CSS.
-* A `Result` instance from another PostCSS processor. PostCSS will accept
- the already parsed `Root` from it.
-* Any object with a `toString()` method — for example, a file stream.
-
-Options:
-
-* `from`: the path of the CSS source file. You should always set `from`,
- because it is used in source map generation and syntax error messages.
-* `to`: the path where you’ll put the output CSS file. You should always set
- `to` to generate correct source maps.
-* `safe`: enable [Safe Mode], in which PostCSS will try
- to fix CSS syntax errors.
-* `map`: an object of [source map options].
-
-## `Result` class
-
-Provides result of PostCSS transformations.
-
-A `Result` instance is returned
-by [`PostCSS#process(css, opts)`] and [`Root#toResult(opts)`].
-
-```js
-var result1 = postcss().process(css);
-var result2 = postcss.parse(css).toResult();
-```
-
-### `result.root`
-
-The source `Root` instance.
-
-```js
-root.toResult().root == root;
-```
-
-### `result.opts`
-
-Options from the [`PostCSS#process(css, opts)`] or
-[`Root#toResult(opts)`] call that produced
-this `Result` instance.
-
-```js
-postcss().process(css, opts).opts == opts;
-```
-
-### `result.css`
-
-A CSS string representing this `Result`’s '`Root` instance.
-
-```js
-postcss().process('a{}').css //=> "a{}"
-```
-
-This property is generated *lazily*: `Root` is not stringified until
-the first request for the `css` property (or the [`result.map`] property).
-That initial request for `css` will also generate a source map.
-Source map will inlined into CSS or assigned to the [`result.map`] property,
-if user ask to save map to separated file.
-
-### `result.map`
-
-An instance of the `SourceMapGenerator` class from the [`source-map`] library,
-representing changes to the `Result`’s `Root` instance.
-
-```js
-result.map.toJSON() //=> { version: 3, file: 'a.css', sources: ['a.css'], … }
-```
-
-This property is generated *lazily*: the source map for `Root` is not generated
-until the first request for the `map` property (or the [`result.css`] property).
-That initial request will also stringify `Root` and assign the generated
-CSS string to the [`result.css`] property.
-
-Additionally, *this property will receive a value only if the user does not wan
-an inline source map*. By default, PostCSS generates inline source maps,
-written directly into the processed CSS; so by default the `map` property
-will be empty.
-
-An external source map will be generated — and assigned to `map` — only if the
-user has set the `map.inline` option to `false`, or if PostCSS was passed
-an external input source map.
-
-```js
-if ( result.map ) {
- fs.writeFileSync(to + '.map', result.map.toString());
-}
-```
-
-## Vendor module
-
-Contains helpers for working with vendor prefixes.
-
-### `vendor.prefix(string)`
-
-Returns the vendor prefix extracted from an input string.
-
-```js
-vendor.prefix('-moz-tab-size') //=> '-moz-'
-```
-
-### `vendor.unprefixed(string)`
-
-Returns the input string stripped of its vendor prefix.
-
-```js
-vendor.unprefixed('-moz-tab-size') //=> 'tab-size'
-```
-
-## List module
-
-Contains helpers for safely splitting lists of CSS values, preserving parentheses
-and quotes.
-
-```js
-var list = require('postcss/lib/list');
-```
-
-### `list.space(string)`
-
-Safely splits space-separated values (such as those for `background`,
-`border-radius`, and other shorthand properties).
-
-```js
-list.space('1px calc(10% + 1px)')
-//=> ['1px', 'calc(10% + 1px)']
-```
-
-### `list.comma(string)`
-
-Safely splits comma-separated values (such as those
-for `transition-*` and `background` properties).
-
-```js
-list.comma('black, linear-gradient(white, black)')
-//=> ['black', 'linear-gradient(white, black)']
-```
-
-## `Input` class
-
-Represents the source CSS.
-
-```js
-var root = postcss.parse(css, { from: file });
-var input = root.source.input;
-```
-
-### `input.file`
-
-The absolute path to the CSS source file defined with
-the [`from` option](#pprocesscss-opts).
-
-```js
-var root = postcss.parse(css, { from: 'a.css' });
-root.source.input.file //=> '/home/ai/a.css'
-```
-
-### `input.id`
-
-The unique ID of the CSS source. This is used if the user did not enter a `from`
-options so PostCSS does not know about a file path.
-
-```js
-var root = postcss.parse(css);
-root.source.input.file //=> undefined
-root.source.input.id //=>
-```
-
-### `input.from`
-
-The CSS source identifier. Contains [`input.file`](#inputfile) if the user set the
-[`from` option](#pprocesscss-opts), or [`input.id`](#inputid) if she did not.
-
-```js
-var root = postcss.parse(css, { from: 'a.css' });
-root.source.input.from //=> '/home/ai/a.css'
-
-var root = postcss.parse(css);
-root.source.input.from //=>
-```
-
-### `input.map`
-
-Represents the input source map passed from a compilation step before PostCSS
-(for example, from the Sass compiler).
-
-`map.consumer()` returns an instance of the `SourceMapConsumer` class
-from the [`source-map`] library.
-
-```js
-root.source.input.map.consumer().sources //=> ['a.sass']
-```
-
-### `input.origin(line, column)`
-
-Reads the input source map and returns a symbol position in the input source
-(for example, in a Sass file that was compiled to CSS before being passed
-to PostCSS):
-
-```js
-root.source.input.origin(1, 1) //=> { source: 'a.css', line: 3, column: 1 }
-```
-
-## Nodes: common methods
-
-All node classes have many common methods.
-
-### `node.type`
-
-Returns a string representing the node’s type.
-
-Possible values are `root`, `atrule`, `rule`, `decl`, or `comment`.
-
-```js
-postcss.decl({ prop: 'color', value: 'black' }).type //=> 'decl'
-```
-
-### `node.parent`
-
-Returns the node’s parent node.
-
-```js
-root.nodes[0].parent == root;
-```
-
-### `node.source`
-
-Returns the input source of the node, with the following properties:
-
-- `node.source.input`: An [`Input`] instance.
-- `node.source.start`: The starting position of the node’s source —
- line and column.
-- `node.source.end`: The ending position of the node’s source — line and column.
-
-```js
-decl.source.input.from //=> '/home/ai/a.sass'
-decl.source.start //=> { line: 10, column: 2 }
-decl.source.end //=> { line: 10, column: 12 }
-```
-
-The property is used in source map generation.
-
-If you create a node manually (for example, with `postcss.decl()`),
-that node will not have a `source` property and will be absent
-from the source map. For this reason, plugin developer should consider
-cloning nodes to create new ones (in which case the new node’s source
-will reference the original, cloned node) or setting the `source` property
-manually.
-
-```js
-// Bad
-var prefixed = postcss.decl({ prop: '-moz-' + decl.prop, value: decl.value });
-
-// Good
-var prefixed = decl.clone({ prop: '-moz-' + decl.prop });
-```
-
-```js
-if ( atrule.name == 'add-link' ) {
- var rule = postcss.rule({ selector: 'a' }); // Rule has no source
- atrule.parent.insertBefore(atrule, rule); // We add it because of atrule
- rule.source = atrule.source; // So we copy source from atrule
-}
-```
-
-### `node.toString()`
-
-Returns a CSS string representing the node.
-
-```js
-postcss.rule({ selector: 'a' }).toString() //=> 'a {}''
-```
-
-### `node.error(message)`
-
-Returns a `CssSyntaxError` instance that presents the original position
-of the node in the source, showing line and column numbers and also
-a small excerpt to facilitate debugging.
-
-It will use an input source map, if present, to get the original position
-of the source, even from a previous compilation step
-(for example, from Sass compilation).
-
-This method produces very useful error messages.
-
-```js
-if ( !variables[name] ) {
- throw decl.error('Unknown variable ' + name);
- // CssSyntaxError: a.sass:4:3: Unknown variable $black
- // a
- // color: $black
- // ^
- // background: white
-}
-
-if ( oldSyntax.check(decl) ) {
- console.warn( decl.error('Old syntax for variables').message );
- // a.sass:4:3: Old syntax for variables
-}
-```
-
-### `node.next()` and `node.prev()`
-
-Returns the next/previous child of the node’s parent; or returns `undefined`
-if the current node is the last/first child.
-
-```js
-var annotation = decl.prev();
-if ( annotation.type == 'comment' ) {
- readAnnotation( annotation.text );
-}
-```
-
-### `node.root()`
-
-Returns the `Root` instance of the node’s tree.
-
-```js
-root.nodes[0].nodes[0].root() == root
-```
-
-### `node.removeSelf()`
-
-Removes the node from its parent, and cleans the `parent` property in the node
-and its children.
-
-```js
-if ( decl.prop.match(/^-webkit-/) ) {
- decl.removeSelf();
-}
-```
-
-### `node.replaceWith(otherNode)`
-
-Inserts another node before the current node, and removes the current node.
-
-```js
-if ( atrule.name == 'mixin' ) {
- atrule.replaceWith(mixinRules[atrule.params]);
-}
-```
-
-### `node.clone(props)`
-
-Returns a clones of the node.
-
-The resultant clone node and its (clone) children will have clean `parent`
-and code style properties. You can override properties in the clone node
-by passing a `props` argument.
-
-```js
-var clonded = decl.clone({ prop: '-moz-' + decl.prop });
-cloned.before //=> undefined
-cloned.parent //=> undefined
-cloned.toString() //=> -moz-transform: scale(0)
-```
-
-### `node.cloneBefore(props)` and `node.cloneAfter(props)`
-
-Shortcuts to clone the node and insert the resultant clone node before/after
-the current node.
-
-```js
-decl.cloneBefore({ prop: '-moz-' + decl.prop });
-```
-
-### `node.moveTo(newParent)`
-
-Removes the node from its current parent and inserts it
-at the end of `newParent`.
-
-This will clean the `before` and `after` code style properties from the node,
-and replace them with the indentation style of `newParent`. It will also clean
-the `between` property if `newParent` is in another `Root`.
-
-```js
-atrule.moveTo(atrule.parent.parent);
-```
-
-### `node.moveBefore(otherNode)` and `node.moveAfter(otherNode)`
-
-Removes the node from its current parent and inserts it into a new parent
-before/after `otherNode`.
-
-This will also clean the node’s code style properties just
-as `node.moveTo(newParent)` does.
-
-### `node.style(prop, defaultType)`
-
-Returns a code style property value. If the node is missing the code style
-property (because the node was manually built or cloned), PostCSS will try
-to autodetect the code style property by looking at other nodes in the tree.
-
-```js
-var root = postcss.parse('a { background: white }');
-root.nodes[0].append({ prop: 'color', value: 'black' });
-root.nodes[0].nodes[1].style('before') //=> ' '
-```
-
-## Containers: common methods
-
-The `Root`, `AtRule`, and `Rule` container nodes have some common methods
-to help work with their children.
-
-Note that all containers can store *any* content. If you write a rule inside
-a rule, PostCSS will parse it.
-
-### `container.nodes`
-
-An array containing the container’s children.
-
-```js
-var root = postcss.parse('a { color: black }');
-root.nodes.length //=> 1
-root.nodes[0].selector //=> 'a'
-root.nodes[0].nodes[0].prop //=> 'color'
-```
-
-### `container.first`
-
-The container’s first child.
-
-```js
-rule.first == rules.nodes[0];
-```
-
-### `container.last`
-
-The container’s last child.
-
-```js
-rule.last == rule.nodes[rule.nodes.length - 1];
-```
-
-### `container.index(child)`
-
-Returns `child`’s index within the container’s `nodes` array.
-
-```js
-rule.index( rule.nodes[2] ) //=> 2
-```
-
-### `container.every(callback)`
-
-Returns `true` if `callback` returns a truthy value for all
-of the container’s children.
-
-```js
-var noPrefixes = rule.every(function (decl) {
- return decl.prop[0] != '-';
-});
-```
-
-### `container.some(callback)`
-
-Return `true` if `callback` returns a truthy value
-for (at least) one of the container’s children.
-
-```js
-var hasPrefix = rule.some(function (decl) {
- return decl.prop[0] == '-';
-});
-```
-
-### `container.each(callback)`
-
-Iterates through the container’s immediate children, calling `callback`
-for each child.
-
-`callback` receives 2 arguments: the node itself and an index.
-
-Returning `false` within `callback` will break iteration.
-
-```js
-var color;
-rule.each(function (decl) {
- if ( decl.prop == 'color' ) {
- color = decl.value;
- return false;
- }
-});
-```
-
-Unlike the `for {}`-cycle or `Array#forEach()` this iterator is safe
-if you are mutating the array of child nodes during iteration.
-PostCSS will adjust the current index to match the mutations.
-
-```js
-var root = postcss.parse('a { color: black; z-index: 1 }');
-var rule = root.first;
-
-for ( var i = 0; i < rule.nodes.length; i++ ) {
- var decl = rule.nodes[i];
- decl.cloneBefore({ prop: '-webkit-' + decl.prop });
- // Cycle will be infinite, because cloneBefore move current node
- // to next index
-}
-
-rule.each(function (decl) {
- decl.cloneBefore({ prop: '-webkit-' + decl.prop });
- // Will be executed only for color and z-index
-});
-```
-
-`container.each()` only iterates through the container’s immediate children.
-If you need to recursively iterate through all the container’s descendents,
-use `container.eachInside()`.
-
-### `container.eachInside(callback)`
-
-Recursively iterates through the container’s children,
-those children’s children, etc., calling `callback` for each.
-
-`callback` receives 2 arguments: the node itself and an index.
-
-```js
-root.eachInside(function (node) {
- // Will be iterate through all nodes
-});
-```
-
-Like `container.each()`, this method is safe to use
-if you are mutating arrays during iteration.
-
-If you only need to iterate through the container’s immediate children,
-use `container.each()`.
-
-### `container.eachDecl([propFilter,] callback)`
-
-Recursively iterates through all declaration nodes within the container,
-calling `callback` for each.
-
-`callback` receives 2 arguments: the node itself and an index.
-
-```js
-root.eachDecl(function (decl) {
- if ( decl.prop.match(/^-webkit-/) ) {
- decl.removeSelf();
- }
-});
-```
-
-If you pass a string or regular expression as `filter`, only those declarations whose
-property matches`filter` will be iterated over.
-
-```js
-// Make flat design
-root.eachDecl('border-radius', function (decl) {
- decl.removeSelf();
-});
-root.eachDecl(/^background/, function (decl) {
- decl.value = takeFirstColorFromGradient(decl.value);
-});
-```
-
-Like `container.each()`, this method is safe to use if you are mutating
-arrays during iteration.
-
-### `container.eachAtRule([nameFilter,] callback)`
-
-Recursively iterates through all at-rule nodes within the container,
-calling `callback` for each.
-
-`callback` receives 2 arguments: the node itself and an index.
-
-
-```js
-root.eachAtRule(function (rule) {
- if ( rule.name.match(/^-webkit-/) ) rule.removeSelf();
-});
-```
-
-If you pass a string or regular expression as `filter`, only those at-rules whose name
-matches `filter` will be iterated over.
-
-```js
-var first = false;
-root.eachAtRule('charset', function (rule) {
- if ( !first ) {
- first = true;
- } else {
- rule.removeSelf();
- }
-});
-```
-
-Like `container.each()`, this method is safe to use if you are mutating arrays
-during iteration.
-
-### `container.eachRule(callback)`
-
-Recursively iterates through all rule nodes within the container, calling
-`callback` for each.
-
-`callback` receives 2 arguments: the node itself and an index.
-
-```js
-var selectors = [];
-root.eachRule(function (rule) {
- selectors.push(rule.selector);
-});
-console.log('You CSS uses ' + selectors.length + ' selectors');
-```
-
-Like `container.each()`, this method is safe to use if you are mutating arrays
-during iteration.
-
-### `container.eachComment(callback)`
-
-Recursively iterates through all comment nodes within the container, calling
-`callback` for each.
-
-```js
-root.eachComment(function (comment) {
- comment.removeSelf();
-})
-```
-
-Like `container.each()`, this method is safe to use if you are mutating arrays
-during iteration.
-
-### `container.replaceValues(regexp, opts, callback)`
-
-Passes all declaration values within the container that match `regexp` through
-`callback`, replacing those values with the returned result of `callback`.
-
-`callback` will receive the same arguments as those passed to a function
-parameter of [`String#replace`].
-
-You can speed up the search by passing `opts`:
-
-- `props`: An array of property names. The method will only search for values
- that match `regexp` within declarations of listed properties.
-- `fast`: A string that will be used to narrow down values and speed up
- the regexp search. Searching every single value with a regexp can be slow;
- so if you pass a `fast` string, PostCSS will first check whether the value
- contains the `fast` string; and only if it does will PostCSS check that value
- against `regexp`. For example, instead of just checking for `/\d+rem/` on
- all values, you can set `fast: 'rem'` to first check whether a value has
- the `rem` unit, and only if it does perform the regexp check.
-
-This method is useful if you are using a custom unit or function,
-so need to iterate through all values.
-
-```js
-root.replaceValues(/\d+rem/, { fast: 'rem' }, function (string) {
- return 15 * parseInt(string) + 'px';
-});
-```
-
-[`String#replace`]: (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_function_as_a_parameter)
-
-### `container.prepend(node)` and `container.append(node)`
-
-Insert a new node to the start/end of the container.
-
-```js
-var decl = postcss.decl({ prop: 'color', value: 'black' });
-rule.append(decl);
-```
-
-Because each node class is identifiable by unique properties, you can use
-the following shortcuts to create nodes to prepend/append:
-
-```js
-root.append({ name: '@charset', params: '"UTF-8"' }); // at-rule
-root.append({ selector: 'a' }); // rule
-rule.append({ prop: 'color', value: 'black' }); // declaration
-rule.append({ text: 'Comment' }) // comment
-```
-
-### `container.insertBefore(oldNode, newNew)` and `container.insertAftr(oldNode, newNew)`
-
-Insert `newNode` before/after `oldNode` within the container.
-
-`oldNode` can be a node or a node’s index.
-
-```js
-rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop }));
-```
-
-You can also use the same shorcuts available to `container.append()`.
-
-```js
-rule.insertBefore(decl, { prop: 'color', value: 'black' });
-```
-
-### `container.remove(node)`
-
-Removes `node` from the container, and the `parent` properties of `node`
-and its children.
-
-`node` can be a node or a node’s index.
-
-```js
-rule.nodes.length //=> 5
-rule.remove(decl);
-rule.nodes.length //=> 4
-decl.parent //=> undefined
-```
-
-### `container.removeAll()`
-
-Removes all children from the container, and cleans their `parent` properties.
-
-```js
-rule.removeAll();
-rule.nodes.length //=> 0
-```
-
-## `Root` node
-
-Represents a CSS file and contains all its parsed nodes.
-
-```js
-var root = postcss.parse('a{color:black} b{z-index:2}');
-root.type //=> 'root'
-root.nodes.length //=> 2
-```
-
-### `root.toResult(opts)`
-
-Returns a [`Result`] instance representing the root's CSS.
-
-```js
-var root1 = postcss.parse(css1, { from: 'a.css' });
-var root2 = postcss.parse(css2, { from: 'b.css' });
-
-root1.append(root2);
-var result = root1.toResult({ to: 'all.css', map: true });
-```
-
-Options:
-
-* `to`: the path where you’ll put the output CSS file. You should always set
- `to` to generate correct source maps.
-* `map`: an object of [source map options].
-
-### `root.after`
-
-The space symbols after the last child of `root`,
-such as `\n` at the end of a file.
-
-```js
-var root = parse('a {}\nb { color: black }\n');
-root.after //=> '\n'
-```
-
-This is a code style property.
-
-## `AtRule` node
-
-Represents an at-rule.
-
-This node will have a `nodes` property, representing its children,
-if it is followed in the CSS by a `{}` block.
-
-
-```js
-var root = postcss.parse('@charset "UTF-8"; @media print {}');
-
-var charset = root.first;
-charset.type //=> 'atrule'
-charset.nodes //=> undefined
-
-var media = root.last;
-media.nodes //=> []
-```
-
-### `atrule.name`
-
-The at-rule’s name. This is the identifier that immediately follows the `@`.
-
-```js
-var root = postcss.parse('@media print {}');
-var media = root.first;
-media.name //=> 'media'
-```
-
-### `atrule.params`
-
-The at-rule’s parameters. These are the values that follow the at-rule’s name
-but precede any `{}` block. The spec refers to this area
-as the at-rule’s “prelude”.
-
-```js
-var root = postcss.parse('@media print, screen {}');
-var media = root.first;
-media.params //=> '[print, screen]'
-```
-
-This value will be cleaned of comments. If the source at-rule’s prelude
-contained comments, those comments will be available
-in the `_params.raw` property.
-
-If you have not changed the parameters, calling `atrule.toString()`
-will stringify the original raw value (comments and all).
-
-```js
-var root = postcss.parse('@media print, /**/ screen {}');
-var media = root.first;
-media.params //=> '[print, screen]'
-media._params.raw //=> 'print, /**/ screen'
-media.toString() //=> '@media print, /**/ screen {}'
-```
-
-### `atrule.before`
-
-The space symbols before the at-rule.
-
-The default value is `\n`, except for the first rule in a `Root`,
-whose `before` property is empty.
-
-```js
-var root = postcss.parse('@charset "UTF-8";\n@media print {}\n');
-var media = root.last;
-media.before //=> '\n'
-```
-
-This is a code style property.
-
-### `atrule.afterName`
-
-The space symbols between the at-rule’s name and its parameters.
-
-The default value is ` `.
-
-```js
-var root = postcss.parse('@media\n print,\n screen {}\n');
-var media = root.first;
-media.afterName //=> '\n '
-```
-
-This is a code style property.
-
-### `atrule.between`
-
-The space symbols between the at-rule’s parameters
-and `{`, the block-opening curly brace.
-
-The default value is ` `.
-
-```js
-var root = postcss.parse('@media print, screen\n{}\n');
-var media = root.first;
-media.before //=> '\n'
-```
-
-This is a code style property.
-
-### `atrule.after`
-
-The space symbols between the at-rule’s last child and `}`,
-the block-closing curly brace.
-
-The default value is `\n` if the at-rule has children,
-and an empty string (`''`) if it does not.
-
-```js
-var root = postcss.parse('@media print {\n a {}\n }\n');
-var media = root.first;
-media.after //=> '\n '
-```
-
-This is a code style property.
-
-### `atrule.semicolon`
-
-`true` if at-rule’s last child declaration
-is followed by an (optional) semicolon.
-
-`undefined` if the semicolon is omitted.
-
-```js
-postcss.parse('@page{color:black}').first.semicolon //=> undefined
-postcss.parse('@page{color:black;}').first.semicolon //=> true
-```
-
-This is a code style property.
-
-## `Rule` node
-
-Represents a CSS rule: a selector followed by a declaration block.
-
-```js
-var root = postcss.parse('a{}');
-var rule = root.first;
-rule.type //=> 'rule'
-rule.toString() //=> 'a{}'
-```
-
-### `rule.selector`
-
-The rule’s full selector represented as a string. If there are multiple
-comma-separated selectors, the entire group will be included.
-
-```js
-var root = postcss.parse('a, b { }');
-var rule = root.first;
-rule.selector //=> 'a, b'
-```
-
-This value will be cleaned of comments. If the source selector contained
-comments, those comments will be available in the `_selector.raw` property.
-
-If you have not changed the selector, the result of `rule.toString()`
-will include the original raw selector value (comments and all).
-
-```js
-var root = postcss.parse('a /**/ b {}');
-var rule = root.first;
-rule.selector //=> 'a b'
-rule._selector.raw //=> 'a /**/ b'
-rule.toString() //=> 'a /**/ b {}'
-```
-
-### `rule.selectors`
-
-An array containing the rule’s individual selectors.
-Groups of selectors are split at commas.
-
-```js
-var root = postcss.parse('a, b { }');
-var rule = root.first;
-
-rule.selector //=> 'a, b'
-rule.selectors //=> ['a', 'b']
-
-rule.selectors = ['a', 'strong'];
-rule.selector //=> 'a, strong'
-```
-
-### `rule.before`
-
-The space symbols before the rule.
-
-The default value is `\n`, except for first rule in root,
-whose `before` property is empty.
-
-```js
-var root = postcss.parse('a {}\nb {}\n');
-var rule = root.last;
-rule.before //=> '\n'
-```
-
-This is a code style property.
-
-### `rule.after`
-
-The space symbols between the rule’s last child and `}`,
-the block-closing curly brace.
-
-The default value is `\n` if rule has children and an empty string (`''`)
-if it does not.
-
-```js
-var root = postcss.parse('@a {\n color: black\n }\n');
-var rule = root.first;
-root.after //=> '\n '
-```
-
-This is a code style property.
-
-### `rule.semicolon`
-
-`true` if rule’s last child declaration is followed by an (optional) semicolon.
-
-`undefined` if the semicolon is omitted.
-
-```js
-postcss.parse('a{color:black}').first.semicolon //=> undefined
-postcss.parse('a{color:black;}').first.semicolon //=> true
-```
-
-This is a code style property.
-
-## `Declaration` node
-
-Represents a CSS declaration.
-
-```js
-var root = postcss.parse('a { color: black }');
-var decl = root.first.first;
-decl.type //=> 'decl'
-decl.toString() //=> ' color: black'
-```
-
-### `declaration.prop`
-
-The declaration’s property name.
-
-```js
-var root = postcss.parse('a { color: black }');
-var decl = root.first.first;
-decl.prop //=> 'color'
-```
-
-### `declaration.value`
-
-The declaration’s value.
-
-```js
-var root = postcss.parse('a { color: black }');
-var decl = root.first.first;
-decl.value //=> 'black'
-```
-
-This value will be cleaned of comments. If the source value contained comments,
-those comments will be available in the `_value.raw` property.
-
-If you have not changed the value, the result of `decl.toString()` will include
-the original raw value (comments and all).
-
-```js
-var root = postcss.parse('a { border-radius: 3px /**/ 0 }');
-var decl = root.first.first;
-decl.value //=> '3px 0'
-decl._value.raw //=> '3px /**/ 0'
-decl.toString() //=> ' border-radius: 3px /**/ 0'
-```
-
-### `declaration.before`
-
-The space symbols before the declaration.
-
-Default value is `\n `.
-
-```js
-var root = postcss.parse('a {\n color: black\n}\n');
-var decl = root.first.first;
-decl.before //=> '\n '
-```
-
-This is a code style property.
-
-### `declaration.between`
-
-The symbols between the declaration’s property and its value.
-
-Default value is `: `.
-
-```js
-var root = postcss.parse('a { color/**/: black }');
-var decl = root.first.first;
-decl.between //=> '/**/: '
-```
-
-This is a code style property.
-
-### `declaration.important`
-
-`true` if the declaration has an `!important` annotation.
-
-```js
-var root = postcss.parse('a { color: black !important; color: white }');
-root.first.first.important //=> true
-root.first.last.important //=> undefined
-```
-
-If there are comments between the declaration’s value and its
-`!important` annotation, they will be available in the `_important` property.
-
-```js
-var root = postcss.parse('a { color: black /**/ !important }');
-root.first.first._important //=> ' /**/ !important'
-```
-
-## `Comment` node
-
-Represents a comment between declarations or statements (rule and at-rules).
-Comments inside selectors, at-rules parameters, or declaration values
-will be stored in the raw properties explained above.
-
-```js
-var root = postcss.parse('a { color: /* inner */ black; /* outer */ }');
-var decl = root.first.first;
-var comment = root.first.last;
-
-comment.type //=> 'comment'
-decl.between //=> ': /* inner */'
-```
-
-### `comment.text`
-
-The comment’s text.
-
-```js
-var root = postcss.parse('/* Empty file */');
-var comment = root.first;
-var comment.text //=> 'Empty file'
-```
-
-### `comment.left` and `comment.right`
-
-The space symbols before/after the comment’s text.
-
-Default value is ` `.
-
-```js
-var root = postcss.parse('/* long */ /*short*/');
-var long = root.first;
-var short = root.last;
-
-long.left //=> ' '
-short.left //=> ''
-```
-
-This is a code style property.
-
-### `comment.before`
-
-The space symbols before the comment.
-
-Default value is `\n`.
-
-```js
-var root = postcss.parse('a {\n /**/}\n');
-var comment = root.first.first;
-comment.before //=> '\n '
-```
-
-This is a code style property.
-
-[`source-map`]: https://github.com/mozilla/source-map
-
-[source map options]: https://github.com/postcss/postcss#source-map
-[Safe Mode]: https://github.com/postcss/postcss#safe-mode
-
-[`PostCSS#process(css, opts)`]: #pprocesscss-opts
-[`Root#toResult(opts)`]: #roottoresult-opts
-[`postcss(plugins)`]: #postcssplugins
-[`Declaration` node]: #declaration-node
-[`Comment` node]: #comment-node
-[`PostCSS#use`]: #puseplugin
-[`AtRule` node]: #atrule-node
-[`result.map`]: #resultmap
-[`result.css`]: #resultcss
-[`Root` node]: #root-node
-[`Rule` node]: #rule-node
-[`Input`]: #inputclass
-[`Result`]: #result-class
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 000000000..45510c7e5
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,1441 @@
+# Change Log
+
+This project adheres to [Semantic Versioning](https://semver.org/).
+
+## 8.5.26
+
+- Fixed `list.split()` regression (by @lazerg).
+- Track symlinks in path protection in source map loading (by @drengir1).
+
+## 8.5.25
+
+- Fixed 8.5.17 visitor regression.
+- Fixed `list.split()` for non-string values (by @amir-rezaei).
+
+## 8.5.24
+
+- Preserve the BOM after the processing (by @hdimer).
+
+## 8.5.23
+
+- Do not load source map without `opts.from` for security reasons.
+
+## 8.5.22
+
+- Fixed custom property losing semicolon before a comment (by @sarathfrancis90).
+
+## 8.5.21
+
+- Fixed childless at-rule losing semicolon before comment (by @sarathfrancis90).
+- Fixed docs (by @isker).
+
+## 8.5.20
+
+- Fixed missing space if `AtRule#params` is set after (by @sarathfrancis90).
+- Fixed mixing AST error on warnings (by @MahinAnowar).
+
+## 8.5.19
+
+- Fixed cleaning `before` for new nodes inserted to `Root` (by @MahinAnowar).
+
+## 8.5.18
+
+- Restricted loading previous source maps file to the `opts.from` folder for security reasons (use `unsafeMap: true` to disable the check).
+
+## 8.5.17
+
+- Fixed `Maximum call stack size exceeded` error.
+- Fixed Prototype hijacking for `postcss.fromJSON()`.
+- Fixed `Input#origin()` for unmapped end position (by @chatman-media).
+
+## 8.5.16
+
+- Fixed `Input#origin()` position (by @mizdra).
+- Fixed `raws` after rehydrating a JSON AST (by @sarathfrancis90).
+- Fixed putting parent-less node in `nodes` of new node (by @MahinAnowar).
+- Fixed computing `offset` in `positionBy()` (by @greymoth-jp).
+- Fixed `rangeBy()` on `index: 0` (by @sarathfrancis90).
+
+## 8.5.15
+
+- Fixed declaration parsing performance (by @homanp).
+
+## 8.5.14
+
+- Fixed custom syntax regression (by @43081j).
+
+## 8.5.13
+
+- Fixed `postcss-scss` commend regression.
+
+## 8.5.12
+
+- Fixed reading any file via user-generated CSS.
+- Added `opts.unsafeMap` to disable checks.
+
+## 8.5.11
+
+- Fixed nested brackets parsing performance (by @offset).
+
+## 8.5.10
+
+- Fixed XSS via unescaped `` in non-bundler cases (by @TharVid).
+
+## 8.5.9
+
+- Speed up source map encoding paring in case of the error.
+
+## 8.5.8
+
+- Fixed `Processor#version`.
+
+## 8.5.7
+
+- Improved source map annotation cleaning performance (by CodeAnt AI).
+
+## 8.5.6
+
+- Fixed `ContainerWithChildren` type discriminating (by @Goodwine).
+
+## 8.5.5
+
+- Fixed `package.json`→`exports` compatibility with some tools (by @JounQin).
+
+## 8.5.4
+
+- Fixed Parcel compatibility issue (by @git-sumitchaudhary).
+
+## 8.5.3
+
+- Added more details to `Unknown word` error (by @hiepxanh).
+- Fixed types (by @romainmenke).
+- Fixed docs (by @catnipan).
+
+## 8.5.2
+
+- Fixed end position of rules with semicolon (by @romainmenke).
+
+## 8.5.1
+
+- Fixed backwards compatibility for complex cases (by @romainmenke).
+
+## 8.5 “Duke Alloces”
+
+- Added `Input#document` for sources like CSS-in-JS or HTML (by @romainmenke).
+
+## 8.4.49
+
+- Fixed custom syntax without `source.offset` (by @romainmenke).
+
+## 8.4.48
+
+- Fixed position calculation in error/warnings methods (by @romainmenke).
+
+## 8.4.47
+
+- Removed debug code.
+
+## 8.4.46
+
+- Fixed `Cannot read properties of undefined (reading 'before')`.
+
+## 8.4.45
+
+- Removed unnecessary fix which could lead to infinite loop.
+
+## 8.4.44
+
+- Another way to fix `markClean is not a function` error.
+
+## 8.4.43
+
+- Fixed `markClean is not a function` error.
+
+## 8.4.42
+
+- Fixed CSS syntax error on long minified files (by @varpstar).
+
+## 8.4.41
+
+- Fixed types (by @nex3 and @querkmachine).
+- Cleaned up RegExps (by @bluwy).
+
+## 8.4.40
+
+- Moved to getter/setter in nodes types to help Sass team (by @nex3).
+
+## 8.4.39
+
+- Fixed `CssSyntaxError` types (by @romainmenke).
+
+## 8.4.38
+
+- Fixed `endIndex: 0` in errors and warnings (by @romainmenke).
+
+## 8.4.37
+
+- Fixed `original.column are not numbers` error in another case.
+
+## 8.4.36
+
+- Fixed `original.column are not numbers` error on broken previous source map.
+
+## 8.4.35
+
+- Avoid `!` in `node.parent.nodes` type.
+- Allow to pass `undefined` to node adding method to simplify types.
+
+## 8.4.34
+
+- Fixed `AtRule#nodes` type (by Tim Weißenfels).
+- Cleaned up code (by Dmitry Kirillov).
+
+## 8.4.33
+
+- Fixed `NoWorkResult` behavior difference with normal mode (by Romain Menke).
+- Fixed `NoWorkResult` usage conditions (by @ahmdammarr).
+
+## 8.4.32
+
+- Fixed `postcss().process()` types (by Andrew Ferreira).
+
+## 8.4.31
+
+- Fixed `\r` parsing to fix CVE-2023-44270.
+
+## 8.4.30
+
+- Improved source map performance (by Romain Menke).
+
+## 8.4.29
+
+- Fixed `Node#source.offset` (by Ido Rosenthal).
+- Fixed docs (by Christian Oliff).
+
+## 8.4.28
+
+- Fixed `Root.source.end` for better source map (by Romain Menke).
+- Fixed `Result.root` types when `process()` has no parser.
+
+## 8.4.27
+
+- Fixed `Container` clone methods types.
+
+## 8.4.26
+
+- Fixed clone methods types.
+
+## 8.4.25
+
+- Improve stringify performance (by Romain Menke).
+- Fixed docs (by @vikaskaliramna07).
+
+## 8.4.24
+
+- Fixed `Plugin` types.
+
+## 8.4.23
+
+- Fixed warnings in TypeDoc.
+
+## 8.4.22
+
+- Fixed TypeScript support with `node16` (by Remco Haszing).
+
+## 8.4.21
+
+- Fixed `Input#error` types (by Aleks Hudochenkov).
+
+## 8.4.20
+
+- Fixed source map generation for childless at-rules like `@layer`.
+
+## 8.4.19
+
+- Fixed whitespace preserving after AST transformations (by Romain Menke).
+
+## 8.4.18
+
+- Fixed an error on `absolute: true` with empty `sourceContent` (by Rene Haas).
+
+## 8.4.17
+
+- Fixed `Node.before()` unexpected behavior (by Romain Menke).
+- Added TOC to docs (by Mikhail Dedov).
+
+## 8.4.16
+
+- Fixed `Root` AST migration.
+
+## 8.4.15
+
+- Fixed AST normalization after using custom parser with old PostCSS AST.
+
+## 8.4.14
+
+- Print “old plugin API” warning only if plugin was used (by @zardoy).
+
+## 8.4.13
+
+- Fixed `append()` error after using `.parent` (by Jordan Pittman).
+
+## 8.4.12
+
+- Fixed `package.funding` to have same value between all PostCSS packages.
+
+## 8.4.11
+
+- Fixed `Declaration#raws.value` type.
+
+## 8.4.10
+
+- Fixed `package.funding` URL format.
+
+## 8.4.9
+
+- Fixed `package.funding` (by Álvaro Mondéjar).
+
+## 8.4.8
+
+- Fixed end position in empty Custom Properties.
+
+## 8.4.7
+
+- Fixed `Node#warn()` type (by Masafumi Koba).
+- Fixed comment removal in values after `,`.
+
+## 8.4.6
+
+- Prevented comment removing when it change meaning of CSS.
+- Fixed parsing space in last semicolon-less CSS Custom Properties.
+- Fixed comment cleaning in CSS Custom Properties with space.
+- Fixed throwing an error on `.root` access for plugin-less case.
+
+## 8.4.5
+
+- Fixed `raws` types to make object extendable (by James Garbutt).
+- Moved from Yarn 1 to pnpm.
+
+## 8.4.4
+
+- Fixed absolute path in source map on zero plugins mode.
+
+## 8.4.3
+
+- Fixed `this.css.replace is not a function` error.
+
+## 8.4.2
+
+- Fixed previous source map support in zero plugins mode.
+
+## 8.4.1
+
+- Fixed `Stringifier` types (by James Garbutt).
+
+## 8.4 “President Camio”
+
+- Added ranges for errors and warnings (by Adaline Valentina Simonian).
+- Added `Stringifier` types (by James Garbutt).
+- Added `Processor` types.
+- Removed `PostCSS does nothing` warning by lazy parser (Bogdan Dolin).
+- Fixed `Node#walkRules()` types (by Aleks Hudochenkov).
+- Fixed types `Root` and `Document` in result values (by James Garbutt).
+- Reduced npm install size by 0.5 MB.
+- Moved tests from Jest to `uvu` (by Andrey Kim).
+- Fixed docs (by Paul Shryock).
+
+## 8.3.11
+
+- Remove debugging code.
+
+## 8.3.10
+
+- Fixed `Maximum call stack` issue of some source maps (by Yeting Li).
+
+## 8.3.9
+
+- Replaced `nanocolors` to `picocolors`.
+- Reduced package size.
+
+## 8.3.8
+
+- Update `nanocolors`.
+
+## 8.3.7
+
+- Replaced `colorette` to `nanocolors`.
+- Added bug field to `package.json` (by Christian Oliff).
+- Improved docs (by Andrew Bruce and Paul Shryock).
+
+## 8.3.6
+
+- Fixed column in `missed semicolon` error (by @Gusted).
+
+## 8.3.5
+
+- Fixed broken AST detection.
+
+## 8.3.4
+
+- Fixed broken AST detection.
+
+## 8.3.3
+
+- Fixed broken AST on `postcss` dependency duplication in custom parsers.
+
+## 8.3.2
+
+- Update changelog.
+
+## 8.3.1
+
+- Fixed false positives `PostCSS does nothing` warning on `syntax` option.
+
+## 8.3 “Duke Murmur”
+
+- Added `Node#assign()` shortcut (by Jonathan Neal).
+- Added experimental `Document` node to AST (by Aleks Hudochenkov).
+- Moved to faster fork of `source-map` (by Valentin Semirulnik).
+
+## 8.2.15
+
+- Fixed `list` type definitions (by @n19htz).
+
+## 8.2.14
+
+- Removed `source-map` from client-side bundle (by Barak Igal).
+
+## 8.2.13
+
+- Fixed ReDoS vulnerabilities in source map parsing (by Yeting Li).
+
+## 8.2.12
+
+- Fixed `package.json` exports.
+
+## 8.2.11
+
+- Fixed `DEP0148` warning in Node.js 16.
+- Fixed docs (by @semiromid).
+
+## 8.2.10
+
+- Fixed ReDoS vulnerabilities in source map parsing.
+- Fixed webpack 5 support (by Barak Igal).
+- Fixed docs (by Roeland Moors).
+
+## 8.2.9
+
+- Exported `NodeErrorOptions` type (by Rouven Weßling).
+
+## 8.2.8
+
+- Fixed browser builds in webpack 4 (by Matt Jones).
+
+## 8.2.7
+
+- Fixed browser builds in webpack 5 (by Matt Jones).
+
+## 8.2.6
+
+- Fixed `Maximum call stack size exceeded` in `Node#toJSON`.
+- Fixed docs (by inokawa).
+
+## 8.2.5
+
+- Fixed escaped characters handling in `list.split` (by Natalie Weizenbaum).
+
+## 8.2.4
+
+- Added plugin name to `postcss.plugin()` warning (by Tom Williams).
+- Fixed docs (by Bill Columbia).
+
+## 8.2.3
+
+- Fixed `JSON.stringify(Node[])` support (by Niklas Mischkulnig).
+
+## 8.2.2
+
+- Fixed CSS-in-JS support (by James Garbutt).
+- Fixed plugin types (by Ludovico Fischer).
+- Fixed `Result#warn()` types.
+
+## 8.2.1
+
+- Fixed `Node#toJSON()` and `postcss.fromJSON()` (by Niklas Mischkulnig).
+
+## 8.2 “Prince Orobas”
+
+- Added `Node#toJSON()` and `postcss.fromJSON()` (by Niklas Mischkulnig).
+
+## 8.1.14
+
+- Fixed parser performance regression.
+
+## 8.1.13
+
+- Fixed broken AST after moving nodes in visitor API.
+
+## 8.1.12
+
+- Fixed Autoprefixer regression.
+
+## 8.1.11
+
+- Added PostCSS update suggestion on unknown event in plugin.
+
+## 8.1.10
+
+- Fixed `LazyResult` type export (by Evan You).
+- Fixed `LazyResult` type compatibility with `Promise` (by Anton Kastritskiy).
+
+## 8.1.9
+
+- Reduced dependencies number (by Bogdan Chadkin).
+
+## 8.1.8
+
+- Fixed `LazyResult` type compatibility with `Promise` (by Ludovico Fischer).
+- Fixed HTTPS links in documentation.
+
+## 8.1.7
+
+- Fixed `import` support in TypeScript (by Remco Haszing).
+
+## 8.1.6
+
+- Reverted `package.exports` Node.js 15 fix.
+
+## 8.1.5
+
+- Fixed Node.js 15 warning (by 沈鸿飞).
+
+## 8.1.4
+
+- Fixed TypeScript definition (by Arthur Petrie).
+
+## 8.1.3
+
+- Added `package.types`.
+
+## 8.1.2
+
+- Fixed API docs (by Arthur Petrie).
+- Improved plugin guide (by Yunus Gaziev).
+- Prepared code base for Deno support (by Oscar Otero).
+
+## 8.1.1
+
+- Updated funding link.
+
+## 8.1 “Duke Gemory”
+
+- Added `Once` and `OnceExit` events.
+- Fixed `Root` and `RootExit` events re-visiting.
+- Fixed node re-visiting on deep children changes.
+- Added docs for visitor API events.
+
+## 8.0.9
+
+- Replace prototype in PostCSS 7 nodes instead of recreating them.
+- Added missed `Transformer` to exported types (by Pierre-Marie Dartus).
+
+## 8.0.8
+
+- Fix `8.0.7` regression on PostCSS 7 nodes converting (by Adam Wathan).
+
+## 8.0.7
+
+- Fixed compatibility issue with mixin AST with PostCSS 7 and 8 nodes.
+- Added migration guide translation to Chinese to the warning.
+
+## 8.0.6
+
+- Fixed child adding methods in `Container`.
+
+## 8.0.5
+
+- Update changelog.
+
+## 8.0.4
+
+- Fixed `Cannot read property 'line' of null` error.
+- Fixed source map support for declarations.
+
+## 8.0.3
+
+- Fixed client-side bundling support.
+
+## 8.0.2
+
+- Fixed plugin packs support.
+
+## 8.0.1
+
+- Updated `Processor#version`.
+
+## 8.0 “President Ose”
+
+- Removed support for Node.js 6.x, 8.x, 11.x, and 13.x versions.
+- Removed `postcss.vendor` helpers.
+- Deprecated `postcss.plugin()` API.
+- Treats `sourceMap.sources` as URL instead of file path.
+- Plugins and runners must have `postcss` in `peerDependencies`.
+- Prohibited to extend PostCSS AST classes.
+- Moved from JSDoc to TypeDoc.
+- Moved unknown source from counter to random IDs.
+- Added visitor API for plugins (by Alexey Bondarenko).
+- Added ES modules support.
+- Added named exports for public classes `const { Rule } = require('postcss)`.
+- Added `position.url` to `Node#origin()` result.
+- Added `opts.maps.absolute = true` option.
+- Added `opts.maps.annotation = (file, root) => url` option support.
+- Added `Node#source.offset` (by Ayaz Zaynutdinov).
+- Added `Declaration#variable`.
+- Added JSON source map support.
+- Added index source map support.
+- Added `Declaration#value` auto-converting to string.
+- Fixed parsing `{}` in at-rule parameters.
+- Fixed parsing empty Custom Properties. `--foo: ;` will have ` ` value.
+- Fixed building PostCSS with Rollup (by MapGrid).
+- Fixed TypeScript types.
+- Fixed source map relative paths.
+- Fixed calling `replaceWith` with input replaced node (by Joseph Kaptur).
+- Improved “Writing a PostCSS Plugin” docs (by Alexey Bondarenko).
+- Removed Babel from the project’s release process.
+- Removed docs from npm package.
+- Replaced `chalk` to `colorette`.
+
+## 7.0.38
+
+- Update `Processor#version`.
+
+## 7.0.37
+
+- Backport `chalk` to `nanocolors` migration.
+
+## 7.0.36
+
+- Backport ReDoS vulnerabilities from PostCSS 8.
+
+## 7.0.35
+
+- Add migration guide link to PostCSS 8 error text.
+
+## 7.0.34
+
+- Fix compatibility with `postcss-scss` 2.
+
+## 7.0.33
+
+- Add error message for PostCSS 8 plugins.
+
+## 7.0.32
+
+- Fix error message (by @admosity).
+
+## 7.0.31
+
+- Use only the latest source map annotation (by Emmanouil Zoumpoulakis).
+
+## 7.0.30
+
+- Fix TypeScript definition (by Natalie Weizenbaum).
+
+## 7.0.29
+
+- Update `Processor#version`.
+
+## 7.0.28
+
+- Fix TypeScript definition (by Natalie Weizenbaum).
+
+## 7.0.27
+
+- Fix TypeScript definition (by Natalie Weizenbaum).
+
+## 7.0.26
+
+- Fix TypeScript definition (by Natalie Weizenbaum).
+
+## 7.0.25
+
+- Fix absolute path support for Windows (by Tom Raviv).
+
+## 7.0.24
+
+- Fix TypeScript definition (by Keith Cirkel).
+
+## 7.0.23
+
+- Update `Processor#version`.
+
+## 7.0.22
+
+- Add funding link for `npm fund`.
+
+## 7.0.21
+
+- Revert passing `nodes` property to node constructor.
+
+## 7.0.20
+
+- Allow to pass PostCSS’s nodes in `nodes` property to node constructor.
+
+## 7.0.19
+
+- Fix passing `nodes` property to node constructor.
+
+## 7.0.18
+
+- Fix TypeScript type definitions (by Jan Buschtöns).
+
+## 7.0.17
+
+- Fix TypeScript type definitions (by Bob Matcuk and Jan Buschtöns).
+
+## 7.0.16
+
+- Revert Custom Properties fix until PostCSS 8.0.
+
+## 7.0.15
+
+- Fix Custom Properties support (by Ivan Solovev).
+
+## 7.0.14
+
+- Fix tokenizer for `postcss-less` (by Matt Lyons).
+
+## 7.0.13
+
+- Fix parsing regression in 7.0.12 for comments between property and value.
+
+## 7.0.12
+
+- Fix parsing broken CSS with two words in declaration property.
+
+## 7.0.11
+
+- Fix source maps on declaration semicolon (by Niklas Mischkulnig).
+
+## 7.0.10
+
+- Fix source maps (by Niklas Mischkulnig).
+
+## 7.0.9
+
+- Increase stringifing performance for non-raws AST.
+
+## 7.0.8
+
+- Fix TypeScript definitions (by Ankur Oberoi).
+- Use `support-colors` 6.0.
+
+## 7.0.7
+
+- Extend `Error` in `CssSyntaxError`.
+
+## 7.0.6
+
+- Fix parsing files with BOM (by Veniamin Krol).
+
+## 7.0.5
+
+- Reduce npm package size (by Gilad Peleg).
+
+## 7.0.4
+
+- Fix safe parser regression.
+
+## 7.0.3
+
+- Fix tokenizer extendability (by Andrew Powell).
+- Reduce npm package size.
+
+## 7.0.2
+
+- Fix warning text (by Rui Pedro M Lima).
+
+## 7.0.1
+
+- Fix JSDoc (by Steven Lambert).
+
+## 7.0 “President Amy”
+
+- Remove Node.js 9 and Node.js 4 support.
+- Remove IE and “dead” browsers support for client-side Babel transpiling.
+- Add CSS position on error happened inside `walk()` (by Nikhil Gaba).
+- Add `LazyResult#finally` (by Igor Kamyshev).
+- Add warning on calling PostCSS without plugins and syntax options.
+- Reduce client-side size.
+
+## 6.0.23
+
+- Fix parsing nested at-rules without semicolon, params, and spaces.
+- Fix docs (by Kevin Schiffer and Pat Cavit).
+
+## 6.0.22
+
+- Fix `Node#prev` and `Node#next` on missed parent.
+
+## 6.0.21
+
+- Rename Chinese docs to fix `yarnpkg.com` issue.
+
+## 6.0.20
+
+- Better error message on `null` as input CSS.
+
+## 6.0.19
+
+- Fix TypeScript definitions for source maps (by Oleh Kuchuk).
+- Fix `source` field in TypeScript definitions (by Sylvain Pollet-Villard).
+
+## 6.0.18
+
+- Use primitive object in TypeScript definitions (by Sylvain Pollet-Villard).
+
+## 6.0.17
+
+- Fix parsing comment in selector between word tokens (by Oleh Kuchuk).
+
+## 6.0.16
+
+- Fix warning text (by Michael Keller).
+
+## 6.0.15
+
+- Add warning about missed `from` option on `process().then()` call.
+- Add IE 10 support.
+
+## 6.0.14
+
+- Fix TypeScript definitions (by Jed Mao).
+
+## 6.0.13
+
+- Fix TypeScript definitions for case of multiple PostCSS versions
+ in `node_modules` (by Chris Eppstein).
+- Use `source-map` 0.6.
+
+## 6.0.12
+
+- Don’t copy `*` hack to declaration indent.
+
+## 6.0.11
+
+- Add upper case `!IMPORTANT` support.
+
+## 6.0.10
+
+- Reduce PostCSS size in webpack bundle.
+
+## 6.0.9
+
+- Improve error message for plugin with old PostCSS (by Igor Adamenko).
+
+## 6.0.8
+
+- Fix Node.js 4.2.2 support.
+
+## 6.0.7
+
+- Fix base64 decoding for old Node.js and browser.
+
+## 6.0.6
+
+- Fix `end` position in at-rule without semicolon (by Oleh Kuchuk).
+
+## 6.0.5
+
+- Move Babel config from `package.json` for `node_modules` compiling cases.
+
+## 6.0.4
+
+- Fix parsing `;;` after rules.
+- Use Chalk 2.0.
+
+## 6.0.3
+
+- Fix escape sequences parsing (by Oleh Kuchuk).
+- Added ability to force disable colors with an environment variable.
+- Improved color detection of some terminal apps.
+
+## 6.0.2
+
+- Keep `raws.before` on moving `Root` children to new `Root`.
+
+## 6.0.1
+
+- Fix parser extensibility to use it in Safe Parser.
+
+## 6.0 “Marquis Orias”
+
+- Remove node.js 0.12 support.
+- Remove deprecated method from PostCSS 4.
+- Insert methods remove child from previous parent, instead of closing.
+- Insert methods and cloning doesn’t clean `raws` anymore.
+- Methods `moveTo`, `moveAfter`, `moveBefore` were deprecated.
+- Options was changed in `Plugin#process(css, processOptions, pluginOptions)`.
+- Add stream parser to reduce memory usage (by Oleh Kuchuk).
+- Add `before()`/`after()` shortcuts for `node.parent.insertBefore(node, x)`.
+- Add `Rule#raws.ownSemicolon` for semicolon after templates for `@apply`.
+- Use `babel-preset-env` to compile npm package.
+- Remove `js-base64` from dependencies (by Roman Dvornov).
+- Fix error message on single `:` in CSS.
+- Move tests to Jest.
+- Clean up test (by Gabriel Kalani).
+
+## 5.2.18
+
+- Fix TypeScript definitions for case of multiple PostCSS versions
+ in `node_modules` (by Chris Eppstein).
+
+## 5.2.17
+
+- Add `postcss-sass` suggestion to syntax error on `.sass` input.
+
+## 5.2.16
+
+- Better error on wrong argument in node constructor.
+
+## 5.2.15
+
+- Fix TypeScript definitions (by bumbleblym).
+
+## 5.2.14
+
+- Fix browser bundle building in webpack (by janschoenherr).
+
+## 5.2.13
+
+- Do not add comment to important raws.
+- Fix JSDoc (by Dmitry Semigradsky).
+
+## 5.2.12
+
+- Fix typo in deprecation message (by Garet McKinley).
+
+## 5.2.11
+
+- Fix TypeScript definitions (by Jed Mao).
+
+## 5.2.10
+
+- Fix TypeScript definitions (by Jed Mao).
+
+## 5.2.9
+
+- Update TypeScript definitions (by Jed Mao).
+
+## 5.2.8
+
+- Fix error message (by Ben Briggs).
+
+## 5.2.7
+
+- Better error message on syntax object in plugins list.
+
+## 5.2.6
+
+- Fix `postcss.vendor` for values with spaces (by 刘祺).
+
+## 5.2.5
+
+- Better error message on unclosed string (by Ben Briggs).
+
+## 5.2.4
+
+- Improve terminal CSS syntax highlight (by Simon Lydell).
+
+## 5.2.3
+
+- Better color highlight in syntax error code frame.
+- Fix color highlight support in old systems.
+
+## 5.2.2
+
+- Update `Processor#version`.
+
+## 5.2.1
+
+- Fix source map path for CSS without `from` option (by Michele Locati).
+
+## 5.2 “Duke Vapula”
+
+- Add syntax highlight to code frame in syntax error (by Andrey Popp).
+- Use Babel code frame style and size in syntax error.
+- Add `[` and `]` tokens to parse `[attr=;] {}` correctly.
+- Add `ignoreErrors` options to tokenizer (by Andrey Popp).
+- Fix error position on tab indent (by Simon Lydell).
+
+## 5.1.2
+
+- Suggests SCSS/Less parsers on parse errors depends on file extension.
+
+## 5.1.1
+
+- Fix TypeScript definitions (by Efremov Alexey).
+
+## 5.1 “King and President Zagan”
+
+- Add URI in source map support (by Mark Finger).
+- Add `map.from` option (by Mark Finger).
+- Add `` mappings for nodes without source (by Bogdan Chadkin).
+- Add function value support to `map.prev` option (by Chris Montoro).
+- Add declaration value type check in shortcut creating (by 刘祺).
+- `Result#warn` now returns new created warning.
+- Don’t call plugin creator in `postcss.plugin` call.
+- Add source maps to PostCSS ES5 build.
+- Add JSDoc to PostCSS classes.
+- Clean npm package from unnecessary docs.
+
+## 5.0.21
+
+- Fix support with input source mao with `utf8` encoding name.
+
+## 5.0.20
+
+- Fix between raw value parsing (by David Clark).
+- Update TypeScript definitions (by Jed Mao).
+- Clean fake node.source after `append(string)`.
+
+## 5.0.19
+
+- Fix indent-based syntaxes support.
+
+## 5.0.18
+
+- Parse new lines according W3C CSS syntax specification.
+
+## 5.0.17
+
+- Fix options argument in `Node#warn` (by Ben Briggs).
+- Fix TypeScript definitions (by Jed Mao).
+
+## 5.0.16
+
+- Fix CSS syntax error position on unclosed quotes.
+
+## 5.0.15
+
+- Fix `Node#clone()` on `null` value somewhere in node.
+
+## 5.0.14
+
+- Allow to use PostCSS in webpack bundle without JSON loader.
+
+## 5.0.13
+
+- Fix `index` and `word` options in `Warning#toString` (by Bogdan Chadkin).
+- Fix input source content loading in errors.
+- Fix map options on using `LazyResult` as input CSS.
+- 100% test coverage.
+- Use Babel 6.
+
+## 5.0.12
+
+- Allow passing a previous map with no mappings (by Andreas Lind).
+
+## 5.0.11
+
+- Increase plugins performance by 1.5 times.
+
+## 5.0.10
+
+- Fix warning from nodes without source.
+
+## 5.0.9
+
+- Fix source map type detection (by @asan).
+
+## 5.0.8
+
+- Fixed a missed step in `5.0.7` that caused the module to be published as
+ ES6 code.
+
+## 5.0.7
+
+- PostCSS now requires that node 0.12 is installed via the engines property
+ in package.json (by Howard Zuo).
+
+## 5.0.6
+
+- Fix parsing nested at-rule without semicolon (by Matt Drake).
+- Trim `Declaration#value` (by Bogdan Chadkin).
+
+## 5.0.5
+
+- Fix multi-tokens property parsing (by Matt Drake).
+
+## 5.0.4
+
+- Fix start position in `Root#source`.
+- Fix source map annotation, when CSS uses `\r\n` (by Mohammad Younes).
+
+## 5.0.3
+
+- Fix `url()` parsing.
+- Fix using `selectors` in `Rule` constructor.
+- Add start source to `Root` node.
+
+## 5.0.2
+
+- Fix `remove(index)` to be compatible with 4.x plugin.
+
+## 5.0.1
+
+- Fix PostCSS 4.x plugins compatibility.
+- Fix type definition loading (by Jed Mao).
+
+## 5.0 “President Valac”
+
+- Remove `safe` option. Move Safe Parser to separate project.
+- `Node#toString` does not include `before` for root nodes.
+- Remove plugin returning `Root` API.
+- Remove Promise polyfill for node.js 0.10.
+- Deprecate `eachInside`, `eachDecl`, `eachRule`, `eachAtRule` and `eachComment`
+ in favor of `walk`, `walkDecls`, `walkRules`, `walkAtRules` and `walkComments`
+ (by Jed Mao).
+- Deprecate `Container#remove` and `Node#removeSelf`
+ in favor of `Container#removeChild` and `Node#remove` (by Ben Briggs).
+- Deprecate `Node#replace` in favor of `replaceWith` (by Ben Briggs).
+- Deprecate raw properties in favor of `Node#raws` object.
+- Deprecate `Node#style` in favor of `raw`.
+- Deprecate `CssSyntaxError#generated` in favor of `input`.
+- Deprecate `Node#cleanStyles` in favor of `cleanRaws`.
+- Deprecate `Root#prevMap` in favor of `Root.source.input.map`.
+- Add `syntax`, `parser` and `stringifier` options for Custom Syntaxes.
+- Add stringifier option to `Node#toString`.
+- Add `Result#content` alias for non-CSS syntaxes.
+- Add `plugin.process(css)` shortcut to every plugin function (by Ben Briggs).
+- Add multiple nodes support to insert methods (by Jonathan Neal).
+- Add `Node#warn` shortcut (by Ben Briggs).
+- Add `word` and `index` options to errors and warnings (by David Clark).
+- Add `line`, `column` properties to `Warning`.
+- Use `supports-color` library to detect color support in error output.
+- Add type definitions for TypeScript plugin developers (by Jed Mao).
+- `Rule#selectors` setter detects separators.
+- Add `postcss.stringify` method.
+- Throw descriptive errors for incorrectly formatted plugins.
+- Add docs to npm release.
+- Fix `url()` parsing.
+- Fix Windows support (by Jed Mao).
+
+## 4.1.16
+
+- Fix errors without stack trace.
+
+## 4.1.15
+
+- Allow asynchronous plugins to change processor plugins list (by Ben Briggs).
+
+## 4.1.14
+
+- Fix for plugins packs defined by `postcss.plugin`.
+
+## 4.1.13
+
+- Fix input inlined source maps with UTF-8 encoding.
+
+## 4.1.12
+
+- Update Promise polyfill.
+
+## 4.1.11
+
+- Fix error message on wrong plugin format.
+
+## 4.1.10
+
+- Fix Promise behavior on sync plugin errors.
+- Automatically fill `plugin` field in `CssSyntaxError`.
+- Fix warning message (by Ben Briggs).
+
+## 4.1.9
+
+- Speed up `node.clone()`.
+
+## 4.1.8
+
+- Accepts `Processor` instance in `postcss()` constructor too.
+
+## 4.1.7
+
+- Speed up `postcss.list` (by Bogdan Chadkin).
+
+## 4.1.6
+
+- Fix Promise behavior on parsing error.
+
+## 4.1.5
+
+- Parse at-words in declaration values.
+
+## 4.1.4
+
+- Fix Promise polyfill dependency (by Anton Yakushev and Matija Marohnić).
+
+## 4.1.3
+
+- Add Promise polyfill for node.js 0.10 and IE.
+
+## 4.1.2
+
+- List helpers can be accessed independently `var space = postcss.list.space`.
+
+## 4.1.1
+
+- Show deprecated message only once.
+
+## 4.1 “Marquis Andras”
+
+- Asynchronous plugin support.
+- Add warnings from plugins and `Result#messages`.
+- Add `postcss.plugin()` to create plugins with a standard API.
+- Insert nodes by CSS string.
+- Show version warning message on error from an outdated plugin.
+- Send `Result` instance to plugins as the second argument.
+- Add `CssSyntaxError#plugin`.
+- Add `CssSyntaxError#showSourceCode()`.
+- Add `postcss.list` and `postcss.vendor` aliases.
+- Add `Processor#version`.
+- Parse wrong closing bracket.
+- Parse `!important` statement with spaces and comments inside (by Ben Briggs).
+- Throw an error on declaration without `prop` or `value` (by Philip Peterson).
+- Fix source map mappings position.
+- Add indexed source map support.
+- Always set `error.generated`.
+- Clean all source map annotation comments.
+
+## 4.0.6
+
+- Remove `babel` from released package dependencies (by Andres Suarez).
+
+## 4.0.5
+
+- Fix error message on double colon in declaration.
+
+## 4.0.4
+
+- Fix indent detection in some rare cases.
+
+## 4.0.3
+
+- Faster API with 6to5 Loose mode.
+- Fix indexed source maps support.
+
+## 4.0.2
+
+- Do not copy IE hacks to code style.
+
+## 4.0.1
+
+- Add `source.input` to `Root` too.
+
+## 4.0 “Duke Flauros”
+
+- Rename `Container#childs` to `nodes`.
+- Rename `PostCSS#processors` to `plugins`.
+- Add `Node#replaceValues()` method.
+- Add `Node#moveTo()`, `moveBefore()` and `moveAfter()` methods.
+- Add `Node#cloneBefore()` and `cloneAfter()` shortcuts.
+- Add `Node#next()`, `prev()` and `root()` shortcuts.
+- Add `Node#replaceWith()` method.
+- Add `Node#error()` method.
+- Add `Container#removeAll()` method.
+- Add filter argument to `eachDecl()` and `eachAtRule()`.
+- Add `Node#source.input` and move `source.file` or `source.id` to `input`.
+- Change code indent, when node was moved.
+- Better fix code style on `Rule`, `AtRule` and `Comment` nodes changes.
+- Allow to create rules and at-rules by hash shortcut in append methods.
+- Add class name to CSS syntax error output.
+
+## 3.0.7
+
+- Fix IE filter parsing with multiple commands.
+- Safer way to consume PostCSS object as plugin (by Maxime Thirouin).
+
+## 3.0.6
+
+- Fix missing semicolon when comment comes after last declaration.
+- Fix Safe Mode declaration parsing on unclosed blocks.
+
+## 3.0.5
+
+- Fix parser to support difficult cases with backslash escape and brackets.
+- Add `CssSyntaxError#stack` (by Maxime Thirouin).
+
+## 3.0.4
+
+- Fix Safe Mode on unknown word before declaration.
+
+## 3.0.3
+
+- Increase tokenizer speed (by Roman Dvornov).
+
+## 3.0.2
+
+- Fix empty comment parsing.
+- Fix `Root#normalize` in some inserts.
+
+## 3.0.1
+
+- Fix Rhino JS runtime support.
+- Typo in deprecated warning (by Maxime Thirouin).
+
+## 3.0 “Marquis Andrealphus”
+
+- New parser, which become the fastest ever CSS parser written in JavaScript.
+- Parser can now parse declarations and rules in one parent (like in `@page`)
+ and nested declarations for plugins like `postcss-nested`.
+- Child nodes array is now in `childs` property, instead of `decls` and `rules`.
+- `map.inline` and `map.sourcesContent` options are now `true` by default.
+- Fix iterators (`each`, `insertAfter`) on children array changes.
+- Use previous source map to show origin source of CSS syntax error.
+- Use 6to5 ES6 compiler, instead of ES6 Transpiler.
+- Use code style for manually added rules from existing rules.
+- Use `from` option from previous source map `file` field.
+- Set `to` value to `from` if `to` option is missing.
+- Use better node source name when missing `from` option.
+- Show a syntax error when `;` is missed between declarations.
+- Allow to pass `PostCSS` instance or list of plugins to `use()` method.
+- Allow to pass `Result` instance to `process()` method.
+- Trim Unicode BOM on source maps parsing.
+- Parse at-rules without spaces like `@import"file"`.
+- Better previous `sourceMappingURL` annotation comment cleaning.
+- Do not remove previous `sourceMappingURL` comment on `map.annotation: false`.
+- Parse nameless at-rules in Safe Mode.
+- Fix source map generation for nodes without source.
+- Fix next child `before` if `Root` first child got removed.
+
+## 2.2.6
+
+- Fix map generation for nodes without source (by Josiah Savary).
+
+## 2.2.5
+
+- Fix source map with BOM marker support (by Mohammad Younes).
+- Fix source map paths (by Mohammad Younes).
+
+## 2.2.4
+
+- Fix `prepend()` on empty `Root`.
+
+## 2.2.3
+
+- Allow to use object shortcut in `use()` with functions like `autoprefixer`.
+
+## 2.2.2
+
+- Add shortcut to set processors in `use()` via object with `.postcss` property.
+
+## 2.2.1
+
+- Send `opts` from `Processor#process(css, opts)` to processors.
+
+## 2.2 “Marquis Cimeies”
+
+- Use GNU style syntax error messages.
+- Add `Node#replace` method.
+- Add `CssSyntaxError#reason` property.
+
+## 2.1.2
+
+- Fix UTF-8 support in inline source map.
+- Fix source map `sourcesContent` if there is no `from` and `to` options.
+
+## 2.1.1
+
+- Allow to miss `to` and `from` options for inline source maps.
+- Add `Node#source.id` if file name is unknown.
+- Better detect splitter between rules in CSS concatenation tools.
+- Automatically clone node in insert methods.
+
+## 2.1 “King Amdusias”
+
+- Change Traceur ES6 compiler to ES6 Transpiler.
+- Show broken CSS line in syntax error.
+
+## 2.0 “King Belial”
+
+- Project was rewritten from CoffeeScript to ES6.
+- Add Safe Mode to works with live input or with hacks from legacy code.
+- More safer parser to pass all hacks from Browserhacks.com.
+- Use real properties instead of magic getter/setter for raw properties.
+
+## 1.0 “Marquis Decarabia”
+
+- Save previous source map for each node to support CSS concatenation
+ with multiple previous maps.
+- Add `map.sourcesContent` option to add origin content to `sourcesContent`
+ inside map.
+- Allow to set different place of output map in annotation comment.
+- Allow to use arrays and `Root` in `Container#append` and same methods.
+- Add `Root#prevMap` with information about previous map.
+- Allow to use latest PostCSS from GitHub by npm.
+- `Result` now is lazy and it will generate output CSS only if you use `css`
+ or `map` property.
+- Use separated `map.prev` option to set previous map.
+- Rename `inlineMap` option to `map.inline`.
+- Rename `mapAnnotation` option to `map.annotation`.
+- `Result#map` now return `SourceMapGenerator` object, instead of string.
+- Run previous map autodetect only if input CSS contains annotation comment.
+- Add `map: 'inline'` shortcut for `map: { inline: true }` option.
+- `Node#source.file` now will contains absolute path.
+- Clean `Declaration#between` style on node clone.
+
+## 0.3.5
+
+- Allow to use `Root` or `Result` as first argument in `process()`.
+- Save parsed AST to `Result#root`.
+
+## 0.3.4
+
+- Better space symbol detect to read UTF-8 BOM correctly.
+
+## 0.3.3
+
+- Remove source map hacks by using new Mozilla’s `source-map` (by Simon Lydell).
+
+## 0.3.2
+
+- Add URI encoding support for inline source maps.
+
+## 0.3.1
+
+- Fix relative paths from previous source map.
+- Safer space split in `Rule#selectors` (by Simon Lydell).
+
+## 0.3 “Prince Seere”
+
+- Add `Comment` node for comments between declarations or rules.
+- Add source map annotation comment to output CSS.
+- Allow to inline source map to annotation comment by data:uri.
+- Fix source maps on Windows.
+- Fix source maps for subdirectory (by Dmitry Nikitenko and Simon Lydell).
+- Autodetect previous source map.
+- Add `first` and `last` shortcuts to container nodes.
+- Parse `!important` to separated property in `Declaration`.
+- Allow to break iteration by returning `false`.
+- Copy code style to new nodes.
+- Add `eachInside` method to recursively iterate all nodes.
+- Add `selectors` shortcut to get selectors array.
+- Add `toResult` method to `Rule` to simplify work with several input files.
+- Clean declaration’s `value`, rule’s `selector` and at-rule’s `params`
+ by storing spaces in `between` property.
+
+## 0.2 “Duke Dantalion”
+
+- Add source map support.
+- Add shortcuts to create nodes.
+- Method `process()` now returns object with `css` and `map` keys.
+- Origin CSS file option was renamed from `file` to `from`.
+- Rename `Node#remove()` method to `removeSelf()` to fix name conflict.
+- Node source was moved to `source` property with origin file
+ and node end position.
+- You can set own CSS generate function.
+
+## 0.1 “Count Andromalius”
+
+- Initial release.
diff --git a/ChangeLog.md b/ChangeLog.md
deleted file mode 100644
index 1e89eab0f..000000000
--- a/ChangeLog.md
+++ /dev/null
@@ -1,190 +0,0 @@
-## 4.0.4
-* Fix indent detection in some rare cases.
-
-## 4.0.3
-* Faster API with 6to5 Loose mode.
-* Fix indexed source maps support.
-
-## 4.0.2
-* Do not copy IE hacks to code style.
-
-## 4.0.1
-* Add `source.input` to `Root` too.
-
-## 4.0 “Duke Flauros”
-* Rename `Container#childs` to `nodes`.
-* Rename `PostCSS#processors` to `plugins`.
-* Add `Node#replaceValues()` method.
-* Add `Node#moveTo()`, `moveBefore()` and `moveAfter()` methods.
-* Add `Node#cloneBefore()` and `cloneAfter()` shortcuts.
-* Add `Node#next()`, `prev()` and `root()` shorcuts.
-* Add `Node#replaceWith()` method.
-* Add `Node#error()` method.
-* Add `Container#removeAll()` method.
-* Add filter argument to `eachDecl()` and `eachAtRule()`.
-* Add `Node#source.input` and move `source.file` or `source.id` to `input`.
-* Change code indent, when node was moved.
-* Better fix code style on `Rule`, `AtRule` and `Comment` nodes changes.
-* Allow to create rules and at-rules by hash shortcut in append methods.
-* Add class name to CSS syntax error output.
-
-## 3.0.7
-* Fix IE filter parsing with multiple commands.
-* Safer way to consume PostCSS object as plugin (by Maxime Thirouin).
-
-## 3.0.6
-* Fix missing semicolon when comment comes after last declaration.
-* Fix Safe Mode declaration parsing on unclosed blocks.
-
-## 3.0.5
-* Fix parser to support difficult cases with backslash escape and brackets.
-* Add `CssSyntaxError#stack` (by Maxime Thirouin).
-
-## 3.0.4
-* Fix Safe Mode on unknown word before declaration.
-
-## 3.0.3
-* Increase tokenizer speed (by Roman Dvornov).
-
-## 3.0.2
-* Fix empty comment parsing.
-* Fix `Root#normalize` in some inserts.
-
-## 3.0.1
-* Fix Rhino JS runtime support.
-* Typo in deprecated warning (by Maxime Thirouin).
-
-## 3.0 “Marquis Andrealphus”
-* New parser, which become the fastest ever CSS parser written in JavaScript.
-* Parser can now parse declarations and rules in one parent (like in `@page`)
- and nested declarations for plugins like `postcss-nested`.
-* Child nodes array is now in `childs` property, instead of `decls` and `rules`.
-* `map.inline` and `map.sourcesContent` options are now `true` by default.
-* Fix iterators (`each`, `insertAfter`) on children array changes.
-* Use previous source map to show origin source of CSS syntax error.
-* Use 6to5 ES6 compiler, instead of ES6 Transpiler.
-* Use code style for manually added rules from existing rules.
-* Use `from` option from previous source map `file` field.
-* Set `to` value to `from` if `to` option is missing.
-* Use better node source name when missing `from` option.
-* Show a syntax error when `;` is missed between declarations.
-* Allow to pass `PostCSS` instance or list of plugins to `use()` method.
-* Allow to pass `Result` instance to `process()` method.
-* Trim Unicode BOM on source maps parsing.
-* Parse at-rules without spaces like `@import"file"`.
-* Better previous `sourceMappingURL` annotation comment cleaning.
-* Do not remove previous `sourceMappingURL` comment on `map.annotation: false`.
-* Parse nameless at-rules in Safe Mode.
-* Fix source map generation for nodes without source.
-* Fix next child `before` if `Root` first child got removed.
-
-## 2.2.6
-* Fix map generation for nodes without source (by Josiah Savary).
-
-## 2.2.5
-* Fix source map with BOM marker support (by Mohammad Younes).
-* Fix source map paths (by Mohammad Younes).
-
-## 2.2.4
-* Fix `prepend()` on empty `Root`.
-
-## 2.2.3
-* Allow to use object shortcut in `use()` with functions like `autoprefixer`.
-
-## 2.2.2
-* Add shortcut to set processors in `use()` via object with `.postcss` property.
-
-## 2.2.1
-* Send `opts` from `Processor#process(css, opts)` to processors.
-
-## 2.2 “Marquis Cimeies”
-* Use GNU style syntax error messages.
-* Add `Node#replace` method.
-* Add `CssSyntaxError#reason` property.
-
-## 2.1.2
-* Fix UTF-8 support in inline source map.
-* Fix source map `sourcesContent` if there is no `from` and `to` options.
-
-## 2.1.1
-* Allow to miss `to` and `from` options for inline source maps.
-* Add `Node#source.id` if file name is unknown.
-* Better detect splitter between rules in CSS concatenation tools.
-* Automatically clone node in insert methods.
-
-## 2.1 “King Amdusias”
-* Change Traceur ES6 compiler to ES6 Transpiler.
-* Show broken CSS line in syntax error.
-
-## 2.0 “King Belial”
-* Project was rewritten from CoffeeScript to ES6.
-* Add Safe Mode to works with live input or with hacks from legacy code.
-* More safer parser to pass all hacks from Browserhacks.com.
-* Use real properties instead of magic getter/setter for raw propeties.
-
-## 1.0 “Marquis Decarabia”
-* Save previous source map for each node to support CSS concatenation
- with multiple previous maps.
-* Add `map.sourcesContent` option to add origin content to `sourcesContent`
- inside map.
-* Allow to set different place of output map in annotation comment.
-* Allow to use arrays and `Root` in `Container#append` and same methods.
-* Add `Root#prevMap` with information about previous map.
-* Allow to use latest PostCSS from GitHub by npm.
-* `Result` now is lazy and it will stringify output CSS only if you use `css` or
- `map` property.
-* Use separated `map.prev` option to set previous map.
-* Rename `inlineMap` option to `map.inline`.
-* Rename `mapAnnotation` option to `map.annotation`.
-* `Result#map` now return `SourceMapGenerator` object, instead of string.
-* Run previous map autodetect only if input CSS contains annotation comment.
-* Add `map: 'inline'` shortcut for `map: { inline: true }` option.
-* `Node#source.file` now will contains absolute path.
-* Clean `Declaration#between` style on node clone.
-
-## 0.3.5
-* Allow to use `Root` or `Result` as first argument in `process()`.
-* Save parsed AST to `Result#root`.
-
-## 0.3.4
-* Better space symbol detect to read UTF-8 BOM correctly.
-
-## 0.3.3
-* Remove source map hacks by using new Mozilla’s `source-map` (by Simon Lydell).
-
-## 0.3.2
-* Add URI encoding support for inline source maps.
-
-## 0.3.1
-* Fix relative paths from previous source map.
-* Safer space split in `Rule#selectors` (by Simon Lydell).
-
-## 0.3 “Prince Seere”
-* Add `Comment` node for comments between declarations or rules.
-* Add source map annotation comment to output CSS.
-* Allow to inline source map to annotation comment by data:uri.
-* Fix source maps on Windows.
-* Fix source maps for styles in subdirectory (by @nDmitry and @lydell).
-* Autodetect previous source map.
-* Add `first` and `last` shortcuts to container nodes.
-* Parse `!important` to separated property in `Declaration`.
-* Allow to break iteration by returning `false`.
-* Copy code style to new nodes.
-* Add `eachInside` method to recursivelly iterate all nodes.
-* Add `selectors` shortcut to get selectors array.
-* Add `toResult` method to `Rule` to simplify work with several input files.
-* Clean declaration’s `value`, rule’s `selector` and at-rule’s `params`
- by storing spaces in `between` property.
-
-## 0.2 “Duke Dantalion”
-* Add source map support.
-* Add shortcuts to create nodes.
-* Method `process()` now returns object with `css` and `map` keys.
-* Origin CSS file option was renamed from `file` to `from`.
-* Rename `Node#remove()` method to `removeSelf()` to fix name conflict.
-* Node source was moved to `source` property with origin file
- and node end position.
-* You can set own stringify function.
-
-## 0.1 “Count Andromalius”
-* Initial release.
diff --git a/LICENSE b/LICENSE
index da057b456..c2314d53d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright 2013 Andrey Sitnik
+Copyright 2013 Andrey Sitnik
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/README.md b/README.md
index 7b1cd8100..01f715fea 100644
--- a/README.md
+++ b/README.md
@@ -1,440 +1,476 @@
-# PostCSS [](https://travis-ci.org/postcss/postcss) [](https://gitter.im/postcss/postcss?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+# PostCSS
-
+
-PostCSS is a tool for transforming CSS with JS plugins. The growing ecosystem
-of PostCSS plugins can add vendor prefixes, support variables and mixins,
-transpile future CSS syntax, inline images, and more.
+PostCSS is a tool for transforming styles with JS plugins.
+These plugins can lint your CSS, support variables and mixins,
+transpile future CSS syntax, inline images, and more.
-PostCSS is used by Google, Twitter, Alibaba, and Shopify.
-Its most popular plugin, [Autoprefixer], is one of the most universally
-praised CSS processors available.
+PostCSS is used by industry leaders including Wikipedia, Twitter, Alibaba,
+and JetBrains. The [Autoprefixer] and [Stylelint] PostCSS plugins are some of the most popular CSS tools.
-PostCSS can do the same work as preprocessors like Sass, Less, and Stylus.
-But PostCSS is modular, 4-40x faster, and much more powerful.
+---
-PostCSS itself is very small. It includes only a CSS parser,
-a CSS node tree API, a source map generator, and a node tree stringifier.
-All CSS transformations are encapsulated in modular plugins. And these plugins
-are themselves small plain JS functions, which receive a CSS node tree,
-apply transformations to it, and return a modified tree.
+ PostCSS is built by Evil Martians, an American design and engineering consultancy for developer tools, AI, and cybersecurity startups.
-You can use the [cssnext] plugin pack and write future CSS code right now:
+---
-```css
-:root {
- --row: 1rem;
- --mainColor: #ffbbaaff;
-}
+[Abstract Syntax Tree]: https://en.wikipedia.org/wiki/Abstract_syntax_tree
+[Evil Martians]: https://evilmartians.com/?utm_source=postcss
+[Autoprefixer]: https://github.com/postcss/autoprefixer
+[Stylelint]: https://stylelint.io/
+[plugins]: https://github.com/postcss/postcss#plugins
+
+## Sponsorship
+
+PostCSS needs your support. We are accepting donations
+[at Open Collective](https://opencollective.com/postcss/).
+
+
+