Skip to content

Commit 5b77b42

Browse files
authored
Reset all properties when using line-clamp-none (#10876)
* reset other properties on `line-clamp-none` * update CHANGELOG
1 parent 71035b7 commit 5b77b42

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- Add `caption-side` utilities ([#10470](https://github.com/tailwindlabs/tailwindcss/pull/10470))
1919
- Add `justify-normal` and `justify-stretch` utilities ([#10560](https://github.com/tailwindlabs/tailwindcss/pull/10560))
2020
- Add `content-normal` and `content-stretch` utilities ([#10645](https://github.com/tailwindlabs/tailwindcss/pull/10645))
21-
- Add `line-clamp` utilities from `@tailwindcss/line-clamp` to core ([#10768](https://github.com/tailwindlabs/tailwindcss/pull/10768))
21+
- Add `line-clamp` utilities from `@tailwindcss/line-clamp` to core ([#10768](https://github.com/tailwindlabs/tailwindcss/pull/10768), [#10876](https://github.com/tailwindlabs/tailwindcss/pull/10876))
2222
- Support ESM and TypeScript config files ([#10785](https://github.com/tailwindlabs/tailwindcss/pull/10785))
2323
- Add `list-style-image` utilities ([#10817](https://github.com/tailwindlabs/tailwindcss/pull/10817))
2424
- Use `:is` to make important selector option insensitive to DOM order ([#10835](https://github.com/tailwindlabs/tailwindcss/pull/10835))

src/corePlugins.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,12 @@ export let corePlugins = {
717717
)
718718

719719
addUtilities({
720-
'.line-clamp-none': { '-webkit-line-clamp': 'unset' },
720+
'.line-clamp-none': {
721+
overflow: 'visible',
722+
display: 'block',
723+
'-webkit-box-orient': 'horizontal',
724+
'-webkit-line-clamp': 'none',
725+
},
721726
})
722727
},
723728

tests/kitchen-sink.test.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,10 @@ crosscheck(({ stable, oxide }) => {
454454
overflow: hidden;
455455
}
456456
.line-clamp-none {
457-
-webkit-line-clamp: unset;
457+
-webkit-line-clamp: none;
458+
-webkit-box-orient: horizontal;
459+
display: block;
460+
overflow: visible;
458461
}
459462
.scale-50 {
460463
--tw-scale-x: 0.5;
@@ -1019,7 +1022,10 @@ crosscheck(({ stable, oxide }) => {
10191022
overflow: hidden;
10201023
}
10211024
.line-clamp-none {
1022-
-webkit-line-clamp: unset;
1025+
-webkit-line-clamp: none;
1026+
-webkit-box-orient: horizontal;
1027+
display: block;
1028+
overflow: visible;
10231029
}
10241030
.scale-50 {
10251031
--tw-scale-x: 0.5;

0 commit comments

Comments
 (0)