From cf2b6d9bd176f2364c42bc913c1b9320762fe703 Mon Sep 17 00:00:00 2001 From: firefoxic Date: Wed, 14 Aug 2024 10:01:12 +0300 Subject: [PATCH] Fix `declaration-property-value-no-unknown` false positives for `oklch()` --- CHANGELOG.md | 4 ++++ stylelint.config.js | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0d6e37..bea43c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and  - The minimum required version of `stylelint` has been increased to `16.8.1`. +### Fixed + +- False positives of `declaration-property-value-no-unknown` rule for `oklch()`. + ## [3.0.0] — 2024–06–07 ### Changed diff --git a/stylelint.config.js b/stylelint.config.js index 71ba3b3..6359ce9 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -52,7 +52,15 @@ export default { `flow-root`, ], }, - "declaration-property-value-no-unknown": true, + "declaration-property-value-no-unknown": [ + true, + // See: https://github.com/stylelint/stylelint/issues/7241 + { + typesSyntax: { + color: `| oklch( [ | | none] [ | | none] [ | none] [ / [ | none] ]? )`, + }, + }, + ], "font-family-name-quotes": `always-where-required`, "font-family-no-duplicate-names": [ true,