From ba54f890377b5fd9a569f0549abb4d3f988fd4b0 Mon Sep 17 00:00:00 2001 From: Thierry Bela Nanga Date: Tue, 13 Oct 2026 16:53:30 -0400 Subject: [PATCH 1/7] fix typos --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++---- files/getting-started.md | 8 ++++---- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90b9c62d..9def6140 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,39 @@ ## Improvement -- limit the amount of memory used when parsing large files -- use node flags as bitmasks +- [x] limit the amount of memory used when parsing large files +- [x] use node flags as bitmasks +- [x] merging properties now takes into consideration the !important flag + +```ts +import {transformSync} from '@tbela99/css-parser'; + + const options = { + input: ` + + button { + line-height: 2.5 !important; + line-height: 1.5; + } + `, + beautify: true, + }; + + const result = transformSync(options); + console.debug(result.code); +``` + +result + +```css +button { + line-height: 2.5!important +} +``` ## Fixes -- [x] fix powerless and missing components handling with color-mix(). missing and powerless colors are now [carried forwarded](https://drafts.csswg.org/css-color-5/#rcs-intro) +- [x] fix powerless and missing components handling with color-mix(). missing and powerless colors are now [carried forward](https://drafts.csswg.org/css-color-5/#rcs-intro) ```ts const css = ` @@ -33,7 +60,7 @@ const result = transformSync({input: css, removeDuplicateDeclarations: false, convertColor: ColorType.SRGB }); -// console.debug(result); + console.debug(result.code); ``` diff --git a/files/getting-started.md b/files/getting-started.md index d4e70f94..e3260c92 100644 --- a/files/getting-started.md +++ b/files/getting-started.md @@ -62,7 +62,7 @@ It can be imported as an umd module. ```html + + + +