From 7a0dcd1d211f3985ae771174268c016ebbb240d9 Mon Sep 17 00:00:00 2001 From: Ben Scott <227292+BPScott@users.noreply.github.com> Date: Wed, 29 Mar 2023 09:05:28 -0700 Subject: [PATCH] Don't replace top/right/bottom/left declarations with inset (#375) Inset is only supported in iOS Safari 14.5+, which we can still potentially support --- .changeset/strong-wolves-impress.md | 5 +++++ packages/stylelint-plugin/index.js | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changeset/strong-wolves-impress.md diff --git a/.changeset/strong-wolves-impress.md b/.changeset/strong-wolves-impress.md new file mode 100644 index 00000000..40c53389 --- /dev/null +++ b/.changeset/strong-wolves-impress.md @@ -0,0 +1,5 @@ +--- +'@shopify/stylelint-plugin': patch +--- + +Don't replace `top`/`right`/`bottom`/`left` declarations with `inset` shorthand as `inset` is only supported in iOS Safari 14.5+ diff --git a/packages/stylelint-plugin/index.js b/packages/stylelint-plugin/index.js index 22ccda7f..c78721dc 100644 --- a/packages/stylelint-plugin/index.js +++ b/packages/stylelint-plugin/index.js @@ -82,9 +82,7 @@ module.exports = { // Disallow longhand properties that can be combined into one shorthand property. 'declaration-block-no-redundant-longhand-properties': [ true, - { - ignoreShorthands: ['/^grid.*/'], - }, + {ignoreShorthands: ['/^grid.*/', 'inset']}, ], // Disallow shorthand properties that override related longhand properties within declaration blocks. 'declaration-block-no-shorthand-property-overrides': true,