Back to Explore

TrySound/postcss-value-parser

GitHub
1 watchersOpen source

Last release: 11/29/2021

postcss-value-parser parses CSS declaration values and at-rule parameters into a tree of nodes, with a traversal API for walking and transforming parts of the value (for example, converting specific functions like rgba()). It also provides methods to stringify the parsed tree back into a CSS value.

Project status

  • The project appears to be maintained at least intermittently, with an upstream push recorded on 2023-03-14, but the most recent tagged update shown here is v4.2.0 from 2021-11-29.
  • Update cadence is low, with updates in 2020 (v4.1.0, v4.0.3) and 2021 (v4.2.0), suggesting long gaps rather than frequent iteration.

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v4.2.0

    11/29/2021

    v4.2.0 adds the ability to report an end position for parsed nodes. The release notes mention this as a new feature, and the code implements it by adding a new index field across the TypeScript types, parser output, and tests.

    Features
  • v4.1.0

    4/28/2020

    v4.1.0 adds support for applying a custom stringification callback to parts of the parsed value inside function expressions. The release notes also mention type improvements, but the code changes include a couple of specific TypeScript signature adjustments that are not spelled out in the notes.

    Features
  • v4.0.3

    2/18/2020

    v4.0.3 updates the TypeScript type definitions for postcss-value-parser. The main change is widening the typing for the `stringify` API to accept either a single `Node` or an array of `Node`s.