Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement negative outline offsets #9136

Merged
merged 2 commits into from Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 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

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