stylelint-plugin-use-baseline 1.2.7 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -50,6 +50,7 @@ This rule reports the following cases:
50
50
  - Media conditions inside `@media` that aren't widely available.
51
51
  - CSS property values that aren't widely available or aren't enclosed in a `@supports` block (currently limited to identifiers only).
52
52
  - CSS functions that aren't widely available.
53
+ - CSS units that aren't widely available (e.g., `svh`, `dvh`, `lvh`, `cqw`).
53
54
  - CSS pseudo-elements and pseudo-classes that aren't widely available.
54
55
  - Unnecessary `@supports` blocks when all checked features are already available at the configured baseline level.
55
56
 
@@ -392,6 +393,34 @@ a {
392
393
  }
393
394
  ```
394
395
 
396
+ ### `ignoreUnits`
397
+
398
+ ```json
399
+ { "ignoreUnits": ["array", "of", "units", "/regex/"] }
400
+ ```
401
+
402
+ Given:
403
+
404
+ ```json
405
+ {
406
+ "plugin/use-baseline": [true, { "available": 2021, "ignoreUnits": ["svh", "/^dv/"] }]
407
+ }
408
+ ```
409
+
410
+ The following patterns are _not_ considered problems:
411
+
412
+ ```css
413
+ a {
414
+ height: 100svh;
415
+ }
416
+ ```
417
+
418
+ ```css
419
+ a {
420
+ height: 100dvh;
421
+ }
422
+ ```
423
+
395
424
  ## Prior art
396
425
 
397
426
  [eslint/css use-baseline](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md)