@@ -90,6 +90,9 @@ let example = autoprefixer({
9090let autofiller = autoprefixer ( {
9191 overrideBrowserslist : [ 'Chrome > 90' , 'Firefox >= 82' ]
9292} )
93+ let textDecorator = autoprefixer ( {
94+ overrideBrowserslist : [ 'Chrome >= 57' , 'Firefox >= 36' , 'Safari >= 12.1' ]
95+ } )
9396let content = autoprefixer ( {
9497 overrideBrowserslist : [
9598 '> 2%' ,
@@ -137,6 +140,8 @@ function prefixer(name) {
137140 name === 'at-rules'
138141 ) {
139142 return intrinsicer
143+ } else if ( name === 'text-decoration-shorthand' ) {
144+ return textDecorator
140145 } else if ( name === 'selectors' || name === 'placeholder' ) {
141146 return selectorer
142147 } else if ( name === 'selectors' || name === 'file-selector-button' ) {
@@ -1139,17 +1144,29 @@ test('add prefix for backface-visibility for Safari 9', () => {
11391144
11401145test ( 'supports text-decoration' , ( ) => {
11411146 let input = read ( 'text-decoration' )
1147+ let output = read ( 'text-decoration.out' )
11421148 let instance = prefixer ( 'text-decoration' )
11431149 let result = postcss ( [ instance ] ) . process ( input )
1150+
1151+ equal ( universalizer ( result . css ) , universalizer ( output ) )
11441152 equal (
11451153 result . warnings ( ) . map ( i => i . toString ( ) ) ,
11461154 [
1147- 'autoprefixer: <css input>:26 :3: Replace text-decoration-skip: ink ' +
1155+ 'autoprefixer: <css input>:32 :3: Replace text-decoration-skip: ink ' +
11481156 'to text-decoration-skip-ink: auto, because spec had been changed'
11491157 ]
11501158 )
11511159} )
11521160
1161+ test ( 'supports text-decoration shorthand' , ( ) => {
1162+ let input = read ( 'text-decoration' )
1163+ let output = read ( 'text-decoration.shorthand.out' )
1164+ let instance = prefixer ( 'text-decoration-shorthand' )
1165+ let result = postcss ( [ instance ] ) . process ( input )
1166+
1167+ equal ( universalizer ( result . css ) , universalizer ( output ) )
1168+ } )
1169+
11531170test ( 'supports -webkit-line-clamp' , ( ) => {
11541171 let input = read ( 'webkit-line-clamp' )
11551172 let result = postcss ( [ cleaner ] ) . process ( input )
0 commit comments