Commit db75028c4f for woocommerce
commit db75028c4f6935e8c7f4787da282cedf790b67df
Author: Albert Juhé Lluveras <contact@albertjuhe.com>
Date: Thu Jan 15 18:12:15 2026 +0100
Update stylelint settings to allow units in 0 values when used inside calc() (#62819)
* Update stylelint settings to allow units in 0 values when used inside calc()
* Add changelog file
diff --git a/plugins/woocommerce/changelog/update-stylelint-allow-0-units-inside-calc b/plugins/woocommerce/changelog/update-stylelint-allow-0-units-inside-calc
new file mode 100644
index 0000000000..cc7b66ea1f
--- /dev/null
+++ b/plugins/woocommerce/changelog/update-stylelint-allow-0-units-inside-calc
@@ -0,0 +1,5 @@
+Significance: patch
+Type: tweak
+Comment: Update stylelint settings to allow units in 0 values when used inside calc()
+
+
diff --git a/plugins/woocommerce/client/admin/stylelint.config.js b/plugins/woocommerce/client/admin/stylelint.config.js
index cfb8d7f7cd..0302c2dc9b 100644
--- a/plugins/woocommerce/client/admin/stylelint.config.js
+++ b/plugins/woocommerce/client/admin/stylelint.config.js
@@ -27,5 +27,6 @@ module.exports = {
'scss/selector-no-redundant-nesting-selector': null,
'selector-id-pattern': null,
'no-invalid-position-at-import-rule': null,
+ 'length-zero-no-unit': [ true, { ignoreFunctions: [ 'calc', 'var' ] } ],
},
};
diff --git a/plugins/woocommerce/client/blocks/.stylelintrc.json b/plugins/woocommerce/client/blocks/.stylelintrc.json
index e15eabd3f6..37fb3d5b42 100644
--- a/plugins/woocommerce/client/blocks/.stylelintrc.json
+++ b/plugins/woocommerce/client/blocks/.stylelintrc.json
@@ -9,6 +9,10 @@
"no-duplicate-selectors": null,
"rule-empty-line-before": null,
"selector-class-pattern": null,
- "value-keyword-case": null
+ "value-keyword-case": null,
+ "length-zero-no-unit": [
+ true,
+ { "ignoreFunctions": [ "calc", "var" ] }
+ ]
}
}