Skip to content

Commit ba56e42

Browse files
authored
Use inset instead of top, right, bottom, and left properties (#10765)
* use `inset` instead of `top`, `right`, `bottom` and `left` properties * update changelog
1 parent c7d605f commit ba56e42

5 files changed

+6
-17
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131
- [Oxide] Disable color opacity plugins by default in the `oxide` engine ([#10618](https://github.com/tailwindlabs/tailwindcss/pull/10618))
3232
- [Oxide] Enable relative content paths for the `oxide` engine ([#10621](https://github.com/tailwindlabs/tailwindcss/pull/10621))
3333
- Mark `rtl` and `ltr` variants as stable and remove warnings ([#10764](https://github.com/tailwindlabs/tailwindcss/pull/10764))
34+
- Use `inset` instead of `top`, `right`, `bottom`, and `left` properties ([#10765](https://github.com/tailwindlabs/tailwindcss/pull/10765))
3435

3536
## [3.2.7] - 2023-02-16
3637

src/corePlugins.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ export let corePlugins = {
626626
inset: createUtilityPlugin(
627627
'inset',
628628
[
629-
['inset', ['top', 'right', 'bottom', 'left']],
629+
['inset', ['inset']],
630630
[
631631
['inset-x', ['left', 'right']],
632632
['inset-y', ['top', 'bottom']],

tests/any-type.test.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,7 @@ crosscheck(({ stable, oxide }) => {
187187
return run(input, config).then((result) => {
188188
let oxideExpected = css`
189189
.inset-\[var\(--any-value\)\] {
190-
top: var(--any-value);
191-
right: var(--any-value);
192-
bottom: var(--any-value);
193-
left: var(--any-value);
190+
inset: var(--any-value);
194191
}
195192
.inset-x-\[var\(--any-value\)\] {
196193
left: var(--any-value);
@@ -738,10 +735,7 @@ crosscheck(({ stable, oxide }) => {
738735
`
739736
let stableExpected = css`
740737
.inset-\[var\(--any-value\)\] {
741-
top: var(--any-value);
742-
right: var(--any-value);
743-
bottom: var(--any-value);
744-
left: var(--any-value);
738+
inset: var(--any-value);
745739
}
746740
.inset-x-\[var\(--any-value\)\] {
747741
left: var(--any-value);

tests/arbitrary-values.oxide.test.css

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
inset: 11px;
33
}
44
.inset-\[var\(--value\)\] {
5-
top: var(--value);
6-
right: var(--value);
7-
bottom: var(--value);
8-
left: var(--value);
5+
inset: var(--value);
96
}
107
.inset-x-\[11px\] {
118
left: 11px;

tests/arbitrary-values.test.css

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
inset: 11px;
33
}
44
.inset-\[var\(--value\)\] {
5-
top: var(--value);
6-
right: var(--value);
7-
bottom: var(--value);
8-
left: var(--value);
5+
inset: var(--value);
96
}
107
.inset-x-\[11px\] {
118
left: 11px;

0 commit comments

Comments
 (0)