Skip to content

Commit 7452425

Browse files
Fix incorrect properties in line-clamp utilities (#13220)
* Overflow fix for #13217 * webkit-box-orient and webkit-line-clamp fix for #13217 * tests fix #13217 * update changelog --------- Co-authored-by: Robin Malfait <[email protected]>
1 parent 4e1f981 commit 7452425

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Fix incorrect properties in line-clamp utilities ([#13220](https://github.com/tailwindlabs/tailwindcss/pull/13220))
13+
1014
### Added
1115

1216
- Support `@theme reference { … }` for defining theme values without emitting variables ([#13222](https://github.com/tailwindlabs/tailwindcss/pull/13222))

packages/tailwindcss/src/utilities.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,31 +1325,31 @@ test('line-clamp', () => {
13251325
expect(run(['line-clamp-4', 'line-clamp-99', 'line-clamp-[123]', 'line-clamp-none']))
13261326
.toMatchInlineSnapshot(`
13271327
".line-clamp-4 {
1328-
overlow: hidden;
13291328
-webkit-line-clamp: 4;
13301329
-webkit-box-orient: vertical;
13311330
display: -webkit-box;
1331+
overflow: hidden;
13321332
}
13331333
13341334
.line-clamp-99 {
1335-
overlow: hidden;
13361335
-webkit-line-clamp: 99;
13371336
-webkit-box-orient: vertical;
13381337
display: -webkit-box;
1338+
overflow: hidden;
13391339
}
13401340
13411341
.line-clamp-\\[123\\] {
1342-
overlow: hidden;
13431342
-webkit-line-clamp: 123;
13441343
-webkit-box-orient: vertical;
13451344
display: -webkit-box;
1345+
overflow: hidden;
13461346
}
13471347
13481348
.line-clamp-none {
1349-
overlow: visible;
1350-
-webkit-box-orient: horizonal;
1351-
-webkit-line-clamp: none;
1349+
-webkit-line-clamp: unset;
1350+
-webkit-box-orient: horizontal;
13521351
display: block;
1352+
overflow: visible;
13531353
}"
13541354
`)
13551355
expect(run(['line-clamp', '-line-clamp-4', '-line-clamp-[123]', '-line-clamp-none'])).toEqual('')

packages/tailwindcss/src/utilities.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -786,16 +786,16 @@ export function createUtilities(theme: Theme) {
786786
* @css `line-clamp`
787787
*/
788788
staticUtility('line-clamp-none', [
789-
['overlow', 'visible'],
789+
['overflow', 'visible'],
790790
['display', 'block'],
791-
['-webkit-box-orient', 'horizonal'],
792-
['-webkit-line-clamp', 'none'],
791+
['-webkit-box-orient', 'horizontal'],
792+
['-webkit-line-clamp', 'unset'],
793793
])
794794
functionalUtility('line-clamp', {
795795
themeKeys: ['--line-clamp'],
796796
handleBareValue: ({ value }) => value,
797797
handle: (value) => [
798-
decl('overlow', 'hidden'),
798+
decl('overflow', 'hidden'),
799799
decl('display', '-webkit-box'),
800800
decl('-webkit-box-orient', 'vertical'),
801801
decl('-webkit-line-clamp', value),

0 commit comments

Comments
 (0)