From 35dfbbd0a35c93e63013d1a9cf9c895fcbc66051 Mon Sep 17 00:00:00 2001 From: wongjn <11310624+wongjn@users.noreply.github.com> Date: Thu, 18 Aug 2022 20:15:59 +0100 Subject: [PATCH 1/2] Implement negative outline offsets --- src/corePlugins.js | 1 + tests/basic-usage.test.css | 3 +++ tests/basic-usage.test.html | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/corePlugins.js b/src/corePlugins.js index 1a19be3f9d8c..2b4dc98bcee2 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -1990,6 +1990,7 @@ export let corePlugins = { outlineOffset: createUtilityPlugin('outlineOffset', [['outline-offset', ['outline-offset']]], { type: ['length', 'number', 'percentage'], + supportsNegativeValues: true, }), outlineColor: ({ matchUtilities, theme }) => { diff --git a/tests/basic-usage.test.css b/tests/basic-usage.test.css index 81781e635378..2f969650c007 100644 --- a/tests/basic-usage.test.css +++ b/tests/basic-usage.test.css @@ -907,6 +907,9 @@ .outline-offset-2 { outline-offset: 2px; } +.-outline-offset-2 { + outline-offset: -2px; +} .outline-black { outline-color: #000; } diff --git a/tests/basic-usage.test.html b/tests/basic-usage.test.html index 7b06a0b685bf..afe6ada565ad 100644 --- a/tests/basic-usage.test.html +++ b/tests/basic-usage.test.html @@ -98,7 +98,7 @@
-
+
From 945b9387bc072a0772cd2638f5eeca65873a2012 Mon Sep 17 00:00:00 2001 From: wongjn <11310624+wongjn@users.noreply.github.com> Date: Fri, 19 Aug 2022 08:28:43 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e13baa42f129..2b0f568f240a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add support fo configuring default `font-feature-settings` for a font family ([#9039](https://github.com/tailwindlabs/tailwindcss/pull/9039)) - Add a standalone CLI build for 32-bit Linux on ARM (`node16-linux-armv7`) ([#9084](https://github.com/tailwindlabs/tailwindcss/pull/9084)) - Add future flag to disable color opacity utility plugins ([#9088](https://github.com/tailwindlabs/tailwindcss/pull/9088)) +- Add negative value support for `outline-offset` ([#9136](https://github.com/tailwindlabs/tailwindcss/pull/9136)) ### Fixed