Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: csstree/csstree
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: eslint/csstree
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Mar 3, 2025

  1. feat: Rename to @eslint/css-tree (#1)

    * feat: Rename to @eslint/css-tree
    
    * Update references
    
    * Update package.json
    
    Co-authored-by: Francesco Trotta <github@fasttime.org>
    
    * Revert CHANGELOG changes
    
    * Update module names in script
    
    * Update package-lock.json
    
    ---------
    
    Co-authored-by: Francesco Trotta <github@fasttime.org>
    nzakas and fasttime authored Mar 3, 2025
    Copy the full SHA
    6f20a43 View commit details

Commits on Mar 10, 2025

  1. chore: Set up release-please (#2)

    * Update references
    
    * chore: Set up release-please
    
    * Revert changelog changes
    nzakas authored Mar 10, 2025
    Copy the full SHA
    214dfea View commit details

Commits on Mar 12, 2025

  1. feat: Add type definitions (#4)

    * feat: Add type definitions
    
    * Update tests/types/types.test.ts
    
    Co-authored-by: Francesco Trotta <github@fasttime.org>
    
    * Update lib/index.d.ts
    
    Co-authored-by: Francesco Trotta <github@fasttime.org>
    
    ---------
    
    Co-authored-by: Francesco Trotta <github@fasttime.org>
    nzakas and fasttime authored Mar 12, 2025
    Copy the full SHA
    e407bae View commit details
  2. fix: Update CSS syntax (#8)

    * fix: Update CSS syntax
    
    * Fix missing definitions
    nzakas authored Mar 12, 2025
    Copy the full SHA
    ff07c1e View commit details
  3. chore: release 3.2.0 🚀 (#6)

    * chore: release 3.2.0 🚀
    
    * Clean up changelog
    
    ---------
    
    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
    github-actions[bot] and nzakas authored Mar 12, 2025
    Copy the full SHA
    b99bf26 View commit details

Commits on Mar 13, 2025

  1. Copy the full SHA
    b403ffb View commit details

Commits on Mar 16, 2025

  1. Copy the full SHA
    d201786 View commit details

Commits on Mar 18, 2025

  1. feat: Add support for typed custom properties (#11)

    feat: add support for typed custom properties
    
    Co-authored-by: Romain Menke <romainmenke@gmail.com>
    nzakas and romainmenke authored Mar 18, 2025
    Copy the full SHA
    0e9d141 View commit details
  2. feat: passthrough env() in lexer syntax matching (#12)

    feat: passthrough env in lexer syntax matching
    
    Co-authored-by: Romain Menke <romainmenke@gmail.com>
    nzakas and romainmenke authored Mar 18, 2025
    Copy the full SHA
    c0e22c0 View commit details
  3. chore: release 3.3.0 🚀 (#10)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Mar 18, 2025
    Copy the full SHA
    9b6830d View commit details

Commits on Mar 20, 2025

  1. Copy the full SHA
    d95706e View commit details
  2. chore: release 3.3.1 🚀 (#16)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Mar 20, 2025
    Copy the full SHA
    f24cb2f View commit details

Commits on Mar 29, 2025

  1. fix: Add missing node types and update other types (#18)

    * fix: Add missing NestingSelector to CssNodePlain
    
    * Add Condition node types
    
    * Add Layer and LayerList node types
    
    * Add Feature, FeatureFunction, FeatureRange
    
    * Fix lexer method types
    
    * Add types test and other fixes
    nzakas authored Mar 29, 2025
    Copy the full SHA
    37a6dd4 View commit details

Commits on Apr 1, 2025

  1. chore: release 3.3.2 🚀 (#19)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Apr 1, 2025
    Copy the full SHA
    0325691 View commit details

Commits on Apr 2, 2025

  1. fix: Remove wrong scroll-timeline property patch (#22)

    fix: Remove wrong scroll-timeline property patch
    skyclouds2001 authored Apr 2, 2025
    Copy the full SHA
    b142b20 View commit details

Commits on Apr 4, 2025

  1. Copy the full SHA
    c4d6c44 View commit details
  2. fix: Remove src descriptor patch (#23)

    * fix: Remove `src` descriptor patch
    
    * fix: remove test for src as a property
    skyclouds2001 authored Apr 4, 2025
    Copy the full SHA
    e3d17f0 View commit details
  3. Copy the full SHA
    2048240 View commit details
  4. Copy the full SHA
    1ea54f7 View commit details
  5. chore: release 3.3.3 🚀 (#24)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Apr 4, 2025
    Copy the full SHA
    ada9f89 View commit details

Commits on Apr 8, 2025

  1. Copy the full SHA
    e3de464 View commit details
  2. fix: Remove outdated anchor() & anchor-size() function patch (#29)

    fix: Remove outdated `anchor()` & `anchor-size()` descriptor patch
    skyclouds2001 authored Apr 8, 2025
    Copy the full SHA
    afd673a View commit details

Commits on Apr 9, 2025

  1. Copy the full SHA
    20b412f View commit details
  2. chore: release 3.3.4 🚀 (#31)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Apr 9, 2025
    Copy the full SHA
    a7b60bc View commit details

Commits on Apr 12, 2025

  1. fix: Types for Node definitions (#34)

    * fix: Types for Node definitions
    
    * Fix types test
    
    * Update type
    nzakas authored Apr 12, 2025
    Copy the full SHA
    e553a25 View commit details

Commits on Apr 16, 2025

  1. feat: Customize tokenize function via the fork API (#36)

    * Customize tokenizer via the fork API
    
    * Update changelog
    
    * Customized tokenizer in the Generator
    
    * Customized tokenizer in the Lexer
    
    * Change syntax
    
    * Utility for retrieving the custom tokenizer
    
    * Tests
    
    * add types
    
    * revert changelog
    scripthunter7 authored Apr 16, 2025
    Copy the full SHA
    e62301c View commit details
  2. chore: release 3.4.0 🚀 (#35)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Apr 16, 2025
    Copy the full SHA
    06d2378 View commit details

Commits on Apr 20, 2025

  1. ci: Update GitHub actions (#38)

    * ci: Update GitHub actions
    
    * Add types test fix
    nzakas authored Apr 20, 2025
    Copy the full SHA
    1fa2e82 View commit details

Commits on Apr 22, 2025

  1. feat: Add support for most CSS nesting rules (#37)

    feat: Nested selector support
    nzakas authored Apr 22, 2025
    Copy the full SHA
    9d6b65f View commit details

Commits on Apr 30, 2025

  1. chore: release 3.5.0 🚀 (#40)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Apr 30, 2025
    Copy the full SHA
    db3c262 View commit details

Commits on May 8, 2025

  1. Copy the full SHA
    d7dc09d View commit details
  2. fix: Add missing <parenthesis-block> type (#42)

    * fix: Add missing <parenthesis-block> type
    
    * Update data/patch.json
    nzakas authored May 8, 2025
    Copy the full SHA
    1695a47 View commit details

Commits on May 12, 2025

  1. chore: release 3.5.1 🚀 (#43)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored May 12, 2025
    Copy the full SHA
    18137c1 View commit details

Commits on May 15, 2025

  1. fix: Types for default-syntax-data and nodes (#44)

    * fix: Types for default-syntax-data and nodes
    
    * Add package.json entry
    nzakas authored May 15, 2025
    Copy the full SHA
    2edbf80 View commit details
  2. chore: release 3.5.2 🚀 (#45)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored May 15, 2025
    Copy the full SHA
    c4de18d View commit details

Commits on May 17, 2025

  1. Copy the full SHA
    5ab882d View commit details

Commits on May 23, 2025

  1. fix: Types for custom nodes and scopes (#47)

    * fix: Types for custom nodes and scopes
    
    * Clean up types
    
    * Remove unneeded comments
    nzakas authored May 23, 2025
    Copy the full SHA
    3a663e1 View commit details
  2. chore: release 3.5.3 🚀 (#48)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored May 23, 2025
    Copy the full SHA
    4291ff4 View commit details

Commits on May 28, 2025

  1. Copy the full SHA
    7194e95 View commit details
  2. chore: release 3.5.4 🚀 (#50)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored May 28, 2025
    Copy the full SHA
    36a308d View commit details

Commits on Jun 1, 2025

  1. feat: Parse nested element selector (#51)

    * feat: Parse nested element selector
    
    * More tests
    
    * Refactor Block arguments
    
    * Remove unused file
    nzakas authored Jun 1, 2025
    Copy the full SHA
    ed3ae55 View commit details

Commits on Jun 3, 2025

  1. Copy the full SHA
    8a707a7 View commit details
  2. fix: isDelim() type (#55)

    nzakas authored Jun 3, 2025
    Copy the full SHA
    9605092 View commit details

Commits on Jun 5, 2025

  1. feat: Add support for math functions (#53)

    * feat: Add support for math functions
    
    * Fix number function categories
    nzakas authored Jun 5, 2025
    Copy the full SHA
    b7c4915 View commit details
  2. chore: release 3.6.0 🚀 (#52)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Jun 5, 2025
    Copy the full SHA
    2f793c9 View commit details

Commits on Jun 8, 2025

  1. Copy the full SHA
    846120b View commit details
  2. fix: ParserContext type to have all methods (#57)

    fix: ParserContext to have all methods
    nzakas authored Jun 8, 2025
    Copy the full SHA
    e069f6f View commit details

Commits on Jun 9, 2025

  1. refactor: Extract children property into interface (#58)

    * refactor: Extract children property into interface
    
    * Update lib/index.d.ts
    
    Co-authored-by: Francesco Trotta <github@fasttime.org>
    
    ---------
    
    Co-authored-by: Francesco Trotta <github@fasttime.org>
    nzakas and fasttime authored Jun 9, 2025
    Copy the full SHA
    8cee500 View commit details
  2. chore: release 3.6.1 🚀 (#59)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Jun 9, 2025
    Copy the full SHA
    409068c View commit details
Showing with 5,439 additions and 410 deletions.
  1. +21 −7 .github/workflows/build.yml
  2. +53 −0 .github/workflows/release-please.yml
  3. +3 −0 .release-please-manifest.json
  4. +138 −2 CHANGELOG.md
  5. +1 −0 LICENSE
  6. +27 −25 README.md
  7. +21 −183 data/patch.json
  8. +13 −13 docs/definition-syntax.md
  9. +5 −5 docs/generate.md
  10. +15 −15 docs/parsing.md
  11. +14 −14 docs/traversal.md
  12. +7 −7 docs/utils.md
  13. +934 −10 fixtures/ast/rule/nesting.json
  14. +89 −2 fixtures/definition-syntax-match/generic.json
  15. +0 −6 fixtures/definition-syntax/default-properties.json
  16. +17 −0 fixtures/definition-syntax/env.json
  17. +1 −1 lib/__tests/clone.js
  18. +92 −1 lib/__tests/common.js
  19. +1 −1 lib/__tests/convert.js
  20. +1 −1 lib/__tests/decode-encode.js
  21. +1 −1 lib/__tests/definition-syntax-generate.js
  22. +1 −1 lib/__tests/definition-syntax-match.js
  23. +1 −1 lib/__tests/definition-syntax-parse.js
  24. +1 −1 lib/__tests/definition-syntax-walk.js
  25. +12 −12 lib/__tests/exports.js
  26. +1 −1 lib/__tests/find.js
  27. +1 −1 lib/__tests/fixture/definition-syntax.js
  28. +1 −1 lib/__tests/fixture/generate-auto-emit-ws.js
  29. +1 −1 lib/__tests/generate.js
  30. +1 −1 lib/__tests/lexer-check-atrule-descriptor.js
  31. +1 −1 lib/__tests/lexer-check-atrule-name.js
  32. +1 −1 lib/__tests/lexer-check-atrule-prelude.js
  33. +1 −1 lib/__tests/lexer-check-property-name.js
  34. +1 −1 lib/__tests/lexer-check-structure.js
  35. +1 −1 lib/__tests/lexer-match-atrule-descriptor.js
  36. +1 −1 lib/__tests/lexer-match-atrule-prelude.js
  37. +30 −2 lib/__tests/lexer-match-property.js
  38. +1 −1 lib/__tests/lexer-match-result.js
  39. +1 −1 lib/__tests/lexer-match-type.js
  40. +1 −1 lib/__tests/lexer-match.js
  41. +1 −1 lib/__tests/lexer-search-fragments.js
  42. +1 −1 lib/__tests/lexer.js
  43. +1 −1 lib/__tests/list.js
  44. +1 −1 lib/__tests/names.js
  45. +1 −1 lib/__tests/parse-extension.js
  46. +1 −1 lib/__tests/parse-selector.js
  47. +1 −1 lib/__tests/parse.js
  48. +1 −1 lib/__tests/tokenizer.js
  49. +1 −1 lib/__tests/walk.js
  50. +11 −0 lib/data.d.ts
  51. +9 −8 lib/generator/create.js
  52. +3,228 −0 lib/index.d.ts
  53. +18 −2 lib/lexer/Lexer.js
  54. +100 −15 lib/lexer/generic.js
  55. +4 −3 lib/lexer/prepare-tokens.js
  56. +4 −3 lib/parser/create.js
  57. +6 −0 lib/syntax/config/mix.js
  58. +3 −1 lib/syntax/config/parser.js
  59. +2 −2 lib/syntax/create.js
  60. +43 −5 lib/syntax/node/Block.js
  61. +1 −1 lib/syntax/node/CDC.js
  62. +1 −1 lib/syntax/node/CDO.js
  63. +1 −2 lib/syntax/node/Rule.js
  64. +18 −0 lib/utils/get-tokenizer.js
  65. +34 −12 package-lock.json
  66. +16 −8 package.json
  67. +9 −0 release-please-config.json
  68. +12 −12 scripts/esm-to-cjs.cjs
  69. +1 −1 scripts/generate-safe/fixture.js
  70. +11 −0 tests/types/tsconfig.json
  71. +385 −0 tests/types/types.test.ts
28 changes: 21 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -5,16 +5,16 @@ on:
pull_request:

env:
PRIMARY_NODEJS_VERSION: 18
PRIMARY_NODEJS_VERSION: 20

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup node ${{ env.PRIMARY_NODEJS_VERSION }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ env.PRIMARY_NODEJS_VERSION }}
cache: "npm"
@@ -28,9 +28,9 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup node ${{ env.PRIMARY_NODEJS_VERSION }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ env.PRIMARY_NODEJS_VERSION }}
cache: "npm"
@@ -60,9 +60,9 @@ jobs:
node: 22

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup node ${{ matrix.node_version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: "npm"
@@ -80,6 +80,20 @@ jobs:
flag-name: node-${{ matrix.node_version }}
parallel: true

test_types:
name: Test Types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install dependencies
run: npm install
- name: Check Types
run: npm run test:types

send-to-coveralls:
name: Send coverage to Coveralls
needs: unit-tests
53 changes: 53 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
models: read
steps:
- uses: googleapis/release-please-action@v4
id: release
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org
if: ${{ steps.release.outputs.release_created }}

- name: Publish to npm
run: |
npm install
npm run build --if-present
npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}

# Generates the social media post
- run: npx @humanwhocodes/social-changelog --org ${{ github.repository_owner }} --repo ${{ github.event.repository.name }} --name 'eslint/css-tree' --tag ${{ steps.release.outputs.tag_name }} > social-post.txt
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Post release announcement
run: npx @humanwhocodes/crosspost -t -b -m --discord-webhook --file social-post.txt
if: ${{ steps.release.outputs.release_created }}
env:
TWITTER_API_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_API_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
MASTODON_HOST: ${{ secrets.MASTODON_HOST }}
BLUESKY_IDENTIFIER: ${{ vars.BLUESKY_IDENTIFIER }}
BLUESKY_PASSWORD: ${{ secrets.BLUESKY_PASSWORD }}
BLUESKY_HOST: ${{ vars.BLUESKY_HOST }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "3.6.1"
}
140 changes: 138 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,135 @@
## next
# Changelog

## [3.6.1](https://github.com/eslint/csstree/compare/css-tree-v3.6.0...css-tree-v3.6.1) (2025-06-09)


### Bug Fixes

* ParserContext to have all methods ([e069f6f](https://github.com/eslint/csstree/commit/e069f6f50e64bb1728208e845498561fa5afe287))
* ParserContext type to have all methods ([#57](https://github.com/eslint/csstree/issues/57)) ([e069f6f](https://github.com/eslint/csstree/commit/e069f6f50e64bb1728208e845498561fa5afe287))
* Types for node generate() function ([#56](https://github.com/eslint/csstree/issues/56)) ([846120b](https://github.com/eslint/csstree/commit/846120b5a0e64b6e7b8105ddef904a07b93e5c8b))

## [3.6.0](https://github.com/eslint/csstree/compare/css-tree-v3.5.4...css-tree-v3.6.0) (2025-06-05)


### Features

* Add support for math functions ([#53](https://github.com/eslint/csstree/issues/53)) ([b7c4915](https://github.com/eslint/csstree/commit/b7c491587de974630bcde75034e3cb55a2edbeca))
* Parse nested element selector ([#51](https://github.com/eslint/csstree/issues/51)) ([ed3ae55](https://github.com/eslint/csstree/commit/ed3ae5503e0d92facaf8d0a81d60b2e35af6c891))


### Bug Fixes

* isDelim() type ([#55](https://github.com/eslint/csstree/issues/55)) ([9605092](https://github.com/eslint/csstree/commit/9605092a76cd7620ad49f1747d6086dd9021fd5a))
* Update MDN data and patch ([#54](https://github.com/eslint/csstree/issues/54)) ([8a707a7](https://github.com/eslint/csstree/commit/8a707a7519ea50f64a68cd77bff1dac678e59326))

## [3.5.4](https://github.com/eslint/csstree/compare/css-tree-v3.5.3...css-tree-v3.5.4) (2025-05-28)


### Bug Fixes

* Types for atrule parsing ([#49](https://github.com/eslint/csstree/issues/49)) ([7194e95](https://github.com/eslint/csstree/commit/7194e958521ffb43cd25ba82645a9ba0f3ec875b))

## [3.5.3](https://github.com/eslint/csstree/compare/css-tree-v3.5.2...css-tree-v3.5.3) (2025-05-23)


### Bug Fixes

* Types for custom nodes and scopes ([#47](https://github.com/eslint/csstree/issues/47)) ([3a663e1](https://github.com/eslint/csstree/commit/3a663e1e94a65b1bc2da4b2cdb052700988efcc4))

## [3.5.2](https://github.com/eslint/csstree/compare/css-tree-v3.5.1...css-tree-v3.5.2) (2025-05-15)


### Bug Fixes

* Types for default-syntax-data and nodes ([#44](https://github.com/eslint/csstree/issues/44)) ([2edbf80](https://github.com/eslint/csstree/commit/2edbf80347b08999197e2dc696aebf1bdcf61b8c))

## [3.5.1](https://github.com/eslint/csstree/compare/css-tree-v3.5.0...css-tree-v3.5.1) (2025-05-08)


### Bug Fixes

* Add missing &lt;parenthesis-block&gt; type ([#42](https://github.com/eslint/csstree/issues/42)) ([1695a47](https://github.com/eslint/csstree/commit/1695a4743bd452438612ab04d7738dc703eb1263))
* Types for NodeSyntaxConfig ([#41](https://github.com/eslint/csstree/issues/41)) ([d7dc09d](https://github.com/eslint/csstree/commit/d7dc09d3d2fda0e34e3573a2c009ee48da8c89ec))

## [3.5.0](https://github.com/eslint/csstree/compare/css-tree-v3.4.0...css-tree-v3.5.0) (2025-04-22)


### Features

* Add support for most CSS nesting rules ([#37](https://github.com/eslint/csstree/issues/37)) ([9d6b65f](https://github.com/eslint/csstree/commit/9d6b65fd1d6d975f188de27d41df83a82c4d7cc2))
* Nested selector support ([9d6b65f](https://github.com/eslint/csstree/commit/9d6b65fd1d6d975f188de27d41df83a82c4d7cc2))

## [3.4.0](https://github.com/eslint/csstree/compare/css-tree-v3.3.4...css-tree-v3.4.0) (2025-04-16)


### Features

* Customize tokenize function via the fork API ([#36](https://github.com/eslint/csstree/issues/36)) ([e62301c](https://github.com/eslint/csstree/commit/e62301cdb67dc7813870712e7302c5d1e00af968))


### Bug Fixes

* Types for Node definitions ([#34](https://github.com/eslint/csstree/issues/34)) ([e553a25](https://github.com/eslint/csstree/commit/e553a25b9ea0562ef75b46583e9375ef307a8318))

## [3.3.4](https://github.com/eslint/csstree/compare/css-tree-v3.3.3...css-tree-v3.3.4) (2025-04-09)


### Bug Fixes

* Remove outdated `anchor()` & `anchor-size()` descriptor patch ([afd673a](https://github.com/eslint/csstree/commit/afd673ad211653084b3d44935c42b972b911de12))
* Remove outdated `anchor()` & `anchor-size()` function patch ([#29](https://github.com/eslint/csstree/issues/29)) ([afd673a](https://github.com/eslint/csstree/commit/afd673ad211653084b3d44935c42b972b911de12))
* Update mdn-data and patch ([#32](https://github.com/eslint/csstree/issues/32)) ([20b412f](https://github.com/eslint/csstree/commit/20b412f1692bd98dcadd732d62c4799882bced73))

## [3.3.3](https://github.com/eslint/csstree/compare/css-tree-v3.3.2...css-tree-v3.3.3) (2025-04-04)


### Bug Fixes

* Add patch for &lt;cubic-bezier-easing-function&gt; ([#28](https://github.com/eslint/csstree/issues/28)) ([c4d6c44](https://github.com/eslint/csstree/commit/c4d6c44931114edfbbacf1de8b26288d15cf9e48)), closes [#27](https://github.com/eslint/csstree/issues/27)
* Remove `src` descriptor patch ([#23](https://github.com/eslint/csstree/issues/23)) ([e3d17f0](https://github.com/eslint/csstree/commit/e3d17f0fc4e1c29df8d80985fbc8a7f9d8c78e2b))
* Remove `unicode-range` descriptor patch ([#25](https://github.com/eslint/csstree/issues/25)) ([2048240](https://github.com/eslint/csstree/commit/2048240bd3811a7fb4f7bbbc18c73e7064196e4e))
* Remove outdated `@font-face/unicode-range` descriptor patch ([#26](https://github.com/eslint/csstree/issues/26)) ([1ea54f7](https://github.com/eslint/csstree/commit/1ea54f7f6c1477c5a9cbae3a233061c85e336f8f))
* Remove wrong `scroll-timeline` property patch ([#22](https://github.com/eslint/csstree/issues/22)) ([b142b20](https://github.com/eslint/csstree/commit/b142b205c0d2d73c5ef27799a35ade92dc271ef7))
* Remove wrong scroll-timeline property patch ([b142b20](https://github.com/eslint/csstree/commit/b142b205c0d2d73c5ef27799a35ade92dc271ef7))

## [3.3.2](https://github.com/eslint/csstree/compare/css-tree-v3.3.1...css-tree-v3.3.2) (2025-03-29)


### Bug Fixes

* Add missing node types and update other types ([#18](https://github.com/eslint/csstree/issues/18)) ([37a6dd4](https://github.com/eslint/csstree/commit/37a6dd47ca30b626852f6cb61b5f7a4744da2e71))

## [3.3.1](https://github.com/eslint/csstree/compare/css-tree-v3.3.0...css-tree-v3.3.1) (2025-03-20)


### Bug Fixes

* SyntaxParseError type ([#15](https://github.com/eslint/csstree/issues/15)) ([d95706e](https://github.com/eslint/csstree/commit/d95706e95b2ef8cbfd27211a753adf73381c643f))

## [3.3.0](https://github.com/eslint/csstree/compare/css-tree-v3.2.0...css-tree-v3.3.0) (2025-03-18)


### Features

* add support for typed custom properties ([0e9d141](https://github.com/eslint/csstree/commit/0e9d14129a108f79bc4c772ee0cc4f1812070215))
* Add support for typed custom properties ([#11](https://github.com/eslint/csstree/issues/11)) ([0e9d141](https://github.com/eslint/csstree/commit/0e9d14129a108f79bc4c772ee0cc4f1812070215))
* passthrough env in lexer syntax matching ([c0e22c0](https://github.com/eslint/csstree/commit/c0e22c0e7c042a60764a51a519b53f18a8ceae62))
* passthrough env() in lexer syntax matching ([#12](https://github.com/eslint/csstree/issues/12)) ([c0e22c0](https://github.com/eslint/csstree/commit/c0e22c0e7c042a60764a51a519b53f18a8ceae62))


### Bug Fixes

* Add parse.SyntaxError and parse.config types ([#14](https://github.com/eslint/csstree/issues/14)) ([d201786](https://github.com/eslint/csstree/commit/d20178613d5b4d6bf6dce36f94cbb04b0eddfe59))
* Add types for onToken callback ([#9](https://github.com/eslint/csstree/issues/9)) ([b403ffb](https://github.com/eslint/csstree/commit/b403ffb6085d5e8c481f62026d88eebd632a3cb5))

## [3.2.0](https://github.com/eslint/csstree/compare/css-tree-v3.1.0...css-tree-v3.2.0) (2025-03-12)


### Features

* Add type definitions ([#4](https://github.com/eslint/csstree/issues/4)) ([e407bae](https://github.com/eslint/csstree/commit/e407bae294cdec1f987fac94b75b7ca7f749c229))
* Rename to @eslint/css-tree ([#1](https://github.com/eslint/csstree/issues/1)) ([6f20a43](https://github.com/eslint/csstree/commit/6f20a4328e323cc0d40dd9407908171a54fac0c0))

- Added `onToken` option to the `parse()` method, which can be either an array or a function:
- When the value is an array, it is populated with objects `{ type, start, end }` (token type, and its start and end offsets).
@@ -26,12 +157,17 @@
- `getBlockTokenPairIndex(tokenIndex)` – returns the index of the pair token for a block, or `-1` if no pair exists
- Fixed `fork()` to extend `node` definitions instead of overriding them. For example, `fork({ node: { Dimension: { generate() { /* ... */ } } } })` will now update only the `generate()` method on the `Dimension` node, while inheriting all other properties from the previous syntax definition.


### Bug Fixes

* Update CSS syntax ([#8](https://github.com/eslint/csstree/issues/8)) ([ff07c1e](https://github.com/eslint/csstree/commit/ff07c1e8ce1989f1c94cbb9ae44e3c8feee1de9e))

## 3.1.0 (December 6, 2024)

- Added support for [boolean expression multiplier](https://drafts.csswg.org/css-values-5/#boolean) in syntax definition, i.e. `<boolean-expr[ test ]>` (#304)
- Added `source`, `startOffset`, `startLine`, and `startColumn` parameters to `OffsetToLocation` constructor, eliminating the need to call `setSource()` after creating a new `OffsetToLocation` instance
- Exposed `OffsetToLocation` class in the main entry point, which was previously accessible only via `css-tree/tokenizer`
- Fixed `Raw` node value consumption by ignoring stop tokens inside blocks, resolving an issue where `Raw` value consumption stopped prematurely. This fix also enables parsing of functions whose content includes stop characters (e.g., semicolons and curly braces) within declaration values, aligning with the latest draft of CSS Values and Units Module Level 5.
- Fixed `Raw` node value consumption by ignoring stop tokens inside blocks, resolving an issue where `Raw` value consumption stopped prematurely. This fix also enables parsing of functions whose content includes stop characters (e.g., semicolons and curly braces) within declaration values, aligning with the latest draft of CSS Values and Units Module Level 5.
- Fixed `TokenStream#balance` computation to handle unmatched brackets correctly. Previously, when encountering a closing bracket, the `TokenStream` would prioritize it over unmatched opening brackets, leading to improper parsing. For example, the parser would incorrectly consume the declaration value of `.a { prop: ([{); }` as `([{)` instead of consuming it until all opened brackets were closed (`([{); }`). Now, unmatched closing brackets are discarded unless they match the most recent opening bracket on the stack. This change aligns CSSTree with CSS specifications and browser behavior.
- Fixed syntax definition parser to allow a token to be followed by a multiplier (#303)
- Fixed location for `Layer` node (#310)
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (C) 2016-2024 by Roman Dvornov
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Loading