---
title: "css-tree 3.0.0 Breaking Changes on npm | Since.dev"
description: "What each css-tree release removed, renamed or changed: 56 breaking changes in 2 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/css-tree
last_updated: 2026-12-04
---

# css-tree breaking changes

css-tree 3.0.0 (September 11, 2024) is its newest release with breaking changes, 33 of them. The first: Removed DefinitionSyntax.syntaxError. Every breaking API change we have recorded in css-tree on npm: 56 breaking changes in 2 versions. Below, its 2 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `3.2.1`, released March 5, 2026. 

Its 2.0.0 release requires Node.js 14.16 or later. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [2.0.0](#v-2-0-0) to [3.0.0](#v-3-0-0): 33 breaking changes in 1 version.

## css-tree 3.0.0 breaking changes

css-tree 3.0.0, released September 11, 2024: 33 breaking changes.

- **Removed** `DefinitionSyntax.syntaxError`  

DefinitionSyntax.syntaxError was removed in css-tree 3.0.0 [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Removed** `GenerateHandlers.children`  

GenerateHandlers.children was removed in css-tree 3.0.0 [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Removed** `GenerateHandlers.chunk`  

GenerateHandlers.chunk was removed in css-tree 3.0.0 [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Removed** `MediaFeature`  

Media features are now parsed as Feature nodes with kind "media" instead of MediaFeature nodes. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Removed** `MediaQuery.children`  

MediaQuery.children was removed in css-tree 3.0.0 [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Removed** `MediaQueryPlain.children`  

MediaQueryPlain.children was removed in css-tree 3.0.0 [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Removed** `Parentheses`  

The @supports parser now emits Condition or SupportsDeclaration nodes instead of Parentheses, so code matching Parentheses must change. [github.com](https://github.com/csstree/csstree/releases/tag/v3.0.0)
- **Removed** `SyntaxParseError.input`  

SyntaxParseError.input was removed in css-tree 3.0.0 [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Removed** `SyntaxParseError.rawMessage`  

SyntaxParseError.rawMessage was removed in css-tree 3.0.0 [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Behavior changed** `Atrule`  

Atrule nodes for a block now include the { and } characters, which changes their output and any code that reads them. [github.com](https://github.com/csstree/csstree/releases/tag/v3.0.0)
- **Behavior changed** `Block`  

The Block node no longer includes the { and } characters, so code reading its content must account for that. [github.com](https://github.com/csstree/csstree/releases/tag/v3.0.0)
- **Behavior changed** `MediaQuery`  

MediaQuery nodes now have modifier, mediaType and condition fields in place of the old structure, so code reading them must be updated. [github.com](https://github.com/csstree/csstree/releases/tag/v3.0.0)
- **Behavior changed** `parseWithFallback`  

parseWithFallback() rewinds the token index before running the fallback, so the fallback starts from a different position than before. [github.com](https://github.com/csstree/csstree/releases/tag/v3.0.0)
- **Behavior changed** `Ratio`  

Ratio parts are now nodes, can be any number or function, and the right part may be omitted, so code expecting strings must change. [github.com](https://github.com/csstree/csstree/releases/tag/v3.0.0)
- **Behavior changed** `Rule`  

Rule nodes for a block now include the { and } characters, which changes their output and any code that reads them. [github.com](https://github.com/csstree/csstree/releases/tag/v3.0.0)
- **Signature changed** `CssNode`  

Was type CssNode = | AnPlusB | Atrule | AtrulePrelude | AttributeSelector | Block | Brackets | CDC | CDO | ClassSelector | Combinator | Comment | Declaration | DeclarationList | Dimension | FunctionNode | Hash | IdSelector | Identifier |... [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `CssNodePlain`  

Was type CssNodePlain = | AnPlusB | AtrulePlain | AtrulePreludePlain | AttributeSelector | BlockPlain | BracketsPlain | CDC | CDO | ClassSelector | Combinator | Comment | DeclarationPlain | DeclarationListPlain | Dimension |... [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `DefinitionSyntax.generate`  

Was generate(node: DSNode, options?: DSGenerateOptions): string; now generate(node: DSNode, options?: DSGenerateOptions | DSGenerateDecorateFn): string. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `DSGenerateOptions.decorate`  

Was decorate?: ((result: string, node: DSNode) => void) | undefined; now decorate?: DSGenerateDecorateFn | undefined. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `DSNode`  

Was type DSNode = | DSNodeAtWord | DSNodeComma | DSNodeFunction | DSNodeGroup | DSNodeKeyword | DSNodeMultiplier | DSNodeProperty | DSNodeString | DSNodeToken | DSNodeType; now type DSNode = | DSNodeAtWord | DSNodeBoolean | DSNodeComma |... [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `DSNodeMultiplied`  

Was type DSNodeMultiplied = | DSNodeFunction | DSNodeGroup | DSNodeKeyword | DSNodeProperty | DSNodeString | DSNodeType; now type DSNodeMultiplied = | DSNodeFunction | DSNodeGroup | DSNodeKeyword | DSNodeProperty | DSNodeString |... [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `fork`  

Was function fork(extension: {atrules?: Record\<string, string> | undefined; properties?: Record\<string, string> | undefined; types?: Record\<string, string> | undefined; cssWideKeywords?: Array\<string> | undefined;}): {lexer: Lexer}; now... [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `GenerateHandlers.node`  

Was node: (node: CssNode) => void; now node(node: CssNode): void. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `GenerateHandlers.result`  

Was result: () => string; now result(): string. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `List.insert`  

Was insert(item: ListItem\<TData>, before: ListItem\<TData>): List\<TData>; now insert(item: ListItem\<TData>, before?: ListItem\<TData> | null): List\<TData>. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `List.pop`  

Was pop(): ListItem\<TData> | undefined; now pop(): ListItem\<TData> | null. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `List.replace`  

Was replace(oldItem: ListItem\<TData>, newItemOrList: List\<TData> | ListItem\<TData>): List\<TData>; now replace(oldItem: ListItem\<TData>, newItemOrList: List\<TData> | ListItem\<TData>): void. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `List.shift`  

Was shift(): ListItem\<TData> | undefined; now shift(): ListItem\<TData> | null. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `Ratio.left`  

Was left: string; now left: NumberNode | FunctionNode. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `Ratio.right`  

Was right: string; now right: NumberNode | FunctionNode | null. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `SyntaxMatchError`  

Was class SyntaxMatchError extends SyntaxError; now interface SyntaxMatchError extends SyntaxError. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `SyntaxReferenceError`  

Was class SyntaxReferenceError extends SyntaxError; now interface SyntaxReferenceError extends SyntaxError. [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)
- **Signature changed** `WalkOptions`  

Was type WalkOptions = | WalkOptionsVisit\<AnPlusB> | WalkOptionsVisit\<Atrule> | WalkOptionsVisit\<AtrulePrelude> | WalkOptionsVisit\<AttributeSelector> | WalkOptionsVisit\<Block> | WalkOptionsVisit\<Brackets> | WalkOptionsVisit\<CDC> |... [npmjs.com](https://www.npmjs.com/package/css-tree/v/3.0.0)

## css-tree 2.0.0 breaking changes

css-tree 2.0.0, released December 3, 2021: 23 breaking changes.

- **Removed**  

Code running on Node.js older than 14.16 can no longer use this release; upgrade Node.js to 14.16 or later. [github.com](https://github.com/csstree/csstree/releases/tag/v2.0.0)
- **Removed** `Lexer.matchDeclaration`  

Lexer#matchDeclaration() no longer exists; stop calling it. [github.com](https://github.com/csstree/csstree/releases/tag/v2.0.0)
- **Removed** `List.each`  

List#each() is gone; use List#forEach() instead. [npmjs.com](https://www.npmjs.com/package/css-tree/v/2.0.0)
- **Removed** `List.eachRight`  

List#eachRight() is gone; use List#forEachRight() instead. [npmjs.com](https://www.npmjs.com/package/css-tree/v/2.0.0)
- **Removed** `List.getSize`  

Use the List#size getter instead of calling List#getSize(). [npmjs.com](https://www.npmjs.com/package/css-tree/v/2.0.0)
- **Removed** `SyntaxError.parseError`  

The parseError field no longer exists on the parser's SyntaxError. [github.com](https://github.com/csstree/csstree/releases/tag/v2.0.0)
- **Removed** `TokenStream.getTokenLength`  

TokenStream#getTokenLength() no longer exists; stop calling it. [github.com](https://github.com/csstree/csstree/releases/tag/v2.0.0)
- **Removed** `TokenStream.skipWS`  

TokenStream#skipWS() no longer exists; stop calling it. [github.com](https://github.com/csstree/csstree/releases/tag/v2.0.0)
- **Removed** `WhiteSpace`  

The parser stops creating WhiteSpace nodes, except for a custom property with a single whitespace token as value. [github.com](https://github.com/csstree/csstree/releases/tag/v2.0.0)
- **Renamed** `chunk`  

Custom generator handlers must use token() to output a single token, and tokenize() for strings. [github.com](https://github.com/csstree/csstree/releases/tag/v2.0.0)

And 13 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
