File tree Expand file tree Collapse file tree 4 files changed +72
-0
lines changed
Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919- Add ` caption-side ` utilities ([ #10470 ] ( https://github.com/tailwindlabs/tailwindcss/pull/10470 ) )
2020- Add ` justify-normal ` and ` justify-stretch ` utilities ([ #10560 ] ( https://github.com/tailwindlabs/tailwindcss/pull/10560 ) )
2121- Add ` content-normal ` and ` content-stretch ` utilities ([ #10645 ] ( https://github.com/tailwindlabs/tailwindcss/pull/10645 ) )
22+ - Add ` line-clamp ` utilities from ` @tailwindcss/line-clamp ` to core ([ #10768 ] ( https://github.com/tailwindlabs/tailwindcss/pull/10768 ) )
2223
2324### Fixed
2425
Original file line number Diff line number Diff line change @@ -703,6 +703,24 @@ export let corePlugins = {
703703 } )
704704 } ,
705705
706+ lineClamp : ( { matchUtilities, addUtilities, theme } ) => {
707+ matchUtilities (
708+ {
709+ 'line-clamp' : ( value ) => ( {
710+ overflow : 'hidden' ,
711+ display : '-webkit-box' ,
712+ '-webkit-box-orient' : 'vertical' ,
713+ '-webkit-line-clamp' : `${ value } ` ,
714+ } ) ,
715+ } ,
716+ { values : theme ( 'lineClamp' ) }
717+ )
718+
719+ addUtilities ( {
720+ '.line-clamp-none' : { '-webkit-line-clamp' : 'unset' } ,
721+ } )
722+ } ,
723+
706724 display : ( { addUtilities } ) => {
707725 addUtilities ( {
708726 '.block' : { display : 'block' } ,
Original file line number Diff line number Diff line change @@ -582,6 +582,14 @@ module.exports = {
582582 auto : 'auto' ,
583583 ...theme ( 'spacing' ) ,
584584 } ) ,
585+ lineClamp : {
586+ 1 : '1' ,
587+ 2 : '2' ,
588+ 3 : '3' ,
589+ 4 : '4' ,
590+ 5 : '5' ,
591+ 6 : '6' ,
592+ } ,
585593 maxHeight : ( { theme } ) => ( {
586594 ...theme ( 'spacing' ) ,
587595 none : 'none' ,
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ crosscheck(({ stable, oxide }) => {
77 content : [
88 {
99 raw : html `
10+ <div
11+ class= "line-clamp-2 line-clamp-[33] line-clamp-[var(--line-clamp-variable)] line-clamp-none"
12+ > </ div>
1013 <div class= "range:text-right multi:text-left" > </ div>
1114 <div
1215 class= "container hover:container sm:container md:container text-center sm:text-center md:text-center"
@@ -432,6 +435,27 @@ crosscheck(({ stable, oxide }) => {
432435 .mt-6 {
433436 margin-top : 1.5rem ;
434437 }
438+ .line-clamp-2 {
439+ -webkit-line-clamp : 2 ;
440+ -webkit-box-orient : vertical;
441+ display : -webkit-box;
442+ overflow : hidden;
443+ }
444+ .line-clamp-\[33 \] {
445+ -webkit-line-clamp : 33 ;
446+ -webkit-box-orient : vertical;
447+ display : -webkit-box;
448+ overflow : hidden;
449+ }
450+ .line-clamp-\[var\(--line-clamp-variable \)\] {
451+ -webkit-line-clamp : var (--line-clamp-variable );
452+ -webkit-box-orient : vertical;
453+ display : -webkit-box;
454+ overflow : hidden;
455+ }
456+ .line-clamp-none {
457+ -webkit-line-clamp : unset;
458+ }
435459 .scale-50 {
436460 --tw-scale-x : 0.5 ;
437461 --tw-scale-y : 0.5 ;
@@ -976,6 +1000,27 @@ crosscheck(({ stable, oxide }) => {
9761000 .mt-6 {
9771001 margin-top : 1.5rem ;
9781002 }
1003+ .line-clamp-2 {
1004+ -webkit-line-clamp : 2 ;
1005+ -webkit-box-orient : vertical;
1006+ display : -webkit-box;
1007+ overflow : hidden;
1008+ }
1009+ .line-clamp-\[33 \] {
1010+ -webkit-line-clamp : 33 ;
1011+ -webkit-box-orient : vertical;
1012+ display : -webkit-box;
1013+ overflow : hidden;
1014+ }
1015+ .line-clamp-\[var\(--line-clamp-variable \)\] {
1016+ -webkit-line-clamp : var (--line-clamp-variable );
1017+ -webkit-box-orient : vertical;
1018+ display : -webkit-box;
1019+ overflow : hidden;
1020+ }
1021+ .line-clamp-none {
1022+ -webkit-line-clamp : unset;
1023+ }
9791024 .scale-50 {
9801025 --tw-scale-x : 0.5 ;
9811026 --tw-scale-y : 0.5 ;
You can’t perform that action at this time.
0 commit comments