Skip to content

Commit

Permalink
Implement negative outline offsets (#9136)
Browse files Browse the repository at this point in the history
* Implement negative outline offsets

* Update changelog
  • Loading branch information
wongjn committed Aug 19, 2022
1 parent 720be91 commit 9d495b9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add support for 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

Expand Down
1 change: 1 addition & 0 deletions src/corePlugins.js
Expand Up @@ -1990,6 +1990,7 @@ export let corePlugins = {

outlineOffset: createUtilityPlugin('outlineOffset', [['outline-offset', ['outline-offset']]], {
type: ['length', 'number', 'percentage'],
supportsNegativeValues: true,
}),

outlineColor: ({ matchUtilities, theme }) => {
Expand Down
3 changes: 3 additions & 0 deletions tests/basic-usage.test.css
Expand Up @@ -907,6 +907,9 @@
.outline-offset-2 {
outline-offset: 2px;
}
.-outline-offset-2 {
outline-offset: -2px;
}
.outline-black {
outline-color: #000;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/basic-usage.test.html
Expand Up @@ -98,7 +98,7 @@
<div class="bg-blend-darken bg-blend-difference"></div>
<div class="mix-blend-multiply mix-blend-saturation"></div>
<div class="order-last order-2"></div>
<div class="outline outline-dashed outline-none outline-black outline-4 outline-offset-2"></div>
<div class="outline outline-dashed outline-none outline-black outline-4 outline-offset-2 -outline-offset-2"></div>
<div class="overflow-hidden"></div>
<div class="overscroll-contain"></div>
<div class="p-4 py-2 px-3 pt-1 pr-2 pb-3 pl-4"></div>
Expand Down

0 comments on commit 9d495b9

Please sign in to comment.