NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #688 most downloaded on npm
An implementation of the CSSStyleDeclaration class from the CSS Object Model specification
Last release 7 months ago
02 Mar 2026
Ships fairly regularly
a new release about every 2 weeks
Most releases are documented
notes for 37 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
14 years old
76 releases · first in 2012
Updated dependencies, notably @webref/css, which causes the propertyDefinitions export to contain information about longhands now.
@webref/css, which causes the propertyDefinitions export to contain information about longhands now.Added parsePropertyValue export.
parsePropertyValue export.Fixed parsing of font-family name lists containing empty font names, e.g. Arial,, to correctly fail.
One column per quarter.
font-family name lists containing empty font names, e.g. Arial,, to correctly fail.stroke property.Fixed getPropertyPriority() often not returning the correct priority.
getPropertyPriority() often not returning the correct priority.path("m 5,5 h 35 L 20,30 z")Significant changes to the supported list of CSS properties to match the latest CSS specifications:
border-block-end-color, border-block-start-color, border-inline-end-color, border-inline-start-color, text-emphasis-color.-webkit-background-composite, -webkit-border-after, -webkit-border-after-color, -webkit-border-after-style, -webkit-border-after-width, -webkit-border-before, -webkit-border-before-color, -webkit-border-before-style, -webkit-border-before-width, -webkit-border-end, -webkit-border-end-color, -webkit-border-end-style, -webkit-border-end-width, -webkit-border-fit, -webkit-border-horizontal-spacing, -webkit-border-start, -webkit-border-start-color, -webkit-border-start-style, -webkit-border-start-width, -webkit-border-vertical-spacing, -webkit-color-correction, -webkit-column-axis, -webkit-column-break-after, -webkit-column-break-before, -webkit-column-break-inside, -webkit-column-rule-color, -webkit-flex-align, -webkit-flex-item-align, -webkit-flex-line-pack, -webkit-flex-order, -webkit-flex-pack, -webkit-font-size-delta, -webkit-font-smoothing, -webkit-highlight, -webkit-hyphenate-limit-after, -webkit-hyphenate-limit-before, -webkit-locale, -webkit-logical-height, -webkit-logical-width, -webkit-margin-after, -webkit-margin-after-collapse, -webkit-margin-before, -webkit-margin-before-collapse, -webkit-margin-bottom-collapse, -webkit-margin-collapse, -webkit-margin-end, -webkit-margin-start, -webkit-margin-top-collapse, -webkit-marquee, -webkit-marquee-direction, -webkit-marquee-increment, -webkit-marquee-repetition, -webkit-marquee-speed, -webkit-marquee-style, -webkit-mask-attachment, -webkit-mask-position-x, -webkit-mask-position-y, -webkit-mask-repeat-x, -webkit-mask-repeat-y, -webkit-match-nearest-mail-blockquote-color, -webkit-max-logical-height, -webkit-max-logical-width, -webkit-min-logical-height, -webkit-min-logical-width, -webkit-nbsp-mode, -webkit-overflow-scrolling, -webkit-padding-after, -webkit-padding-before, -webkit-padding-end, -webkit-padding-start, -webkit-perspective-origin-x, -webkit-perspective-origin-y, -webkit-region-break-after, -webkit-region-break-before, -webkit-region-break-inside, -webkit-region-overflow, -webkit-rtl-ordering, -webkit-svg-shadow, -webkit-tap-highlight-color, -webkit-text-decorations-in-effect, -webkit-text-emphasis-color, -webkit-text-security, -webkit-transform-origin-x, -webkit-transform-origin-y, -webkit-transform-origin-z, -webkit-user-drag, -webkit-user-modify, -webkit-wrap, -webkit-wrap-margin, -webkit-wrap-padding, -webkit-wrap-shape-inside, -webkit-wrap-shape-outside, -webkit-zoom, color-profile, color-rendering, enable-background, glyph-orientation-horizontal, kerning, marker-offset, marks, size, src, text-line-through, text-line-through-color, text-line-through-mode, text-line-through-style, text-line-through-width, text-overline, text-overline-color, text-overline-mode, text-overline-style, text-overline-width, text-underline, text-underline-color, text-underline-mode, text-underline-style, text-underline-width, unicode-range.propertyList export, which was an object, with the propertyDefinitions export, which is a Map containing similar information. (However, the extended property is removed from the values of the Map.)CSSStyleDeclaration class:
length setter.enumerable.Fixed assigning non-string values to CSS properties to properly convert to strings.
top property being treated as invalid. (This regressed in v5.3.6.)Improved performance, notably by introducing a CSS parsing and validation cache.
Updated dependencies. This fixed some subtle issues regarding, e.g., relative colors with calc(), or the syntax of the clip property.
calc(), or the syntax of the clip property.Improved performance when calling the cssText setter.
cssText setter.Fix the parsing of colors inside the border-related shorthand properties, i.e. border, border-top, border-bottom, border-left, border-right.
border, border-top, border-bottom, border-left, border-right.Fix the cssText setter to discard invalid declarations.
cssText setter to discard invalid declarations.Fix parsing flex-basis in shorthand flex when it is not an explicit value or dimension, e.g., flex: 0 0 auto.
flex-basis in shorthand flex when it is not an explicit value or dimension, e.g., flex: 0 0 auto.Improve internal processing by switching from regular expression matching to AST-based parsing.
Modify parsers to be AST-based
cssText.border, flex, margin, and padding shorthands.propertyList export that lists the supported properties and their data. (This will eventually be used in jsdom, but it is still experimental.)Fix a regression in v5.2.0 where the generated files used \ in require() calls, which was very broken.
\ in require() calls, which was very broken.Change the parser used for the cssText setter from rrweb-cssom to css-tree.
cssText setter from rrweb-cssom to css-tree.Implement full display property parsing and serialization
display property parsing and serializationThe minimum supported Node.js version is now v20.
The minimum supported Node.js version is now v20.
!important with custom properties. (This regressed in v4.4.0.)Add some missing system colors.
generic() font-family keyword support.Update font-family parsing and serialization, and font shorthand parsing, to be spec-compliant.
font-family parsing and serialization, and font shorthand parsing, to be spec-compliant.var() inside background-* properties.Update the property list to be based on the latest specs, in particular removing the deprecated azumith property and some deprecated WebKit properties…
cssText getter now returns the empty string if the computed flag is set.cssText setter, and the removeProperty() and setProperty() methods, now throw if the readonly flag is set.parentRule getter now returns the parent CSSRule instead of always returning null.item() method now throws if no argument is given.unset support.azumith property and some deprecated WebKit properties.Improve url() parsing and serialization
url() parsing and serialization (#194)@asamuzakjp/css-color to improve calc() serialization (#192)Improve background-image parsing
background-image parsing (#186)border-color parsing (#185)top/left/bottom/right to support the auto keyword (#178)@asamuzakjp/css-color to improve color parsing (#188)Update rrweb-cssom dependency.
Update rrweb-cssom dependency.
Improve color support with the `@asamuzakjp/css-color` package
@asamuzakjp/css-color package (#171)var() and nested calc() (#179)Add calc() support for margin and padding properties.
calc() support for margin and padding properties. (#175)Re-added the performance fix that was supposed to appear in v4.0.0, but was accidentally un-done in another commit in that release.
Handle margin and padding, and their sub-properties like marginTop, better, especially when set to the empty string or null. (#162, #165)
margin and padding, and their sub-properties like marginTop, better, especially when set to the empty string or null. (#162, #165)cssText property. (#164)onChange callback when the serialized property value does not change. (#147)Use rrweb-cssom, a maintained fork of cssom (closes #153)
Add support for un-computed calc() values
calc() valuesAdd basic support for CSS custom properties
was 151.1 kB / 1.5 MB ... now 30.0 kB (packed) / 174.4 kB (unpacked)
151.1 kB / 1.5 MB ... now 30.0 kB (packed) / 174.4 kB (unpacked)ch unit.Add support to hex alpha transparency (#rgba)
Add missing valid color refs 'transparent' and 'currentcolor'
Nothing published for this version
Nothing published for this version
Test node versions 6, 8, 10, and 11 in CI
Added new script to download CSS properties from W3C standard
Nothing published for this version
Nothing published for this version
Moving forward, developers can expect semver compatibility. No breaking changes will be introduced as patches, etc.
This release includes a few minor bug fixes, but more importantly marks the beginning of semantic versioning for this package.
Moving forward, developers can expect semver compatibility. No breaking changes will be introduced as patches, etc.
More information can be found at semver.
Version 0.3.0 marks the change in ownership of this package. I have already merged a few outstanding pull requests will continue to do so. Pull reques
Version 0.3.0 marks the change in ownership of this package. I have already merged a few outstanding pull requests will continue to do so. Pull requests are welcome from the community.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →