@@ -90,6 +90,9 @@ let example = autoprefixer({
90
90
let autofiller = autoprefixer ( {
91
91
overrideBrowserslist : [ 'Chrome > 90' , 'Firefox >= 82' ]
92
92
} )
93
+ let textDecorator = autoprefixer ( {
94
+ overrideBrowserslist : [ 'Chrome >= 57' , 'Firefox >= 36' , 'Safari >= 12.1' ]
95
+ } )
93
96
let content = autoprefixer ( {
94
97
overrideBrowserslist : [
95
98
'> 2%' ,
@@ -137,6 +140,8 @@ function prefixer(name) {
137
140
name === 'at-rules'
138
141
) {
139
142
return intrinsicer
143
+ } else if ( name === 'text-decoration-shorthand' ) {
144
+ return textDecorator
140
145
} else if ( name === 'selectors' || name === 'placeholder' ) {
141
146
return selectorer
142
147
} else if ( name === 'selectors' || name === 'file-selector-button' ) {
@@ -1139,17 +1144,29 @@ test('add prefix for backface-visibility for Safari 9', () => {
1139
1144
1140
1145
test ( 'supports text-decoration' , ( ) => {
1141
1146
let input = read ( 'text-decoration' )
1147
+ let output = read ( 'text-decoration.out' )
1142
1148
let instance = prefixer ( 'text-decoration' )
1143
1149
let result = postcss ( [ instance ] ) . process ( input )
1150
+
1151
+ equal ( universalizer ( result . css ) , universalizer ( output ) )
1144
1152
equal (
1145
1153
result . warnings ( ) . map ( i => i . toString ( ) ) ,
1146
1154
[
1147
- 'autoprefixer: <css input>:26 :3: Replace text-decoration-skip: ink ' +
1155
+ 'autoprefixer: <css input>:32 :3: Replace text-decoration-skip: ink ' +
1148
1156
'to text-decoration-skip-ink: auto, because spec had been changed'
1149
1157
]
1150
1158
)
1151
1159
} )
1152
1160
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
+
1153
1170
test ( 'supports -webkit-line-clamp' , ( ) => {
1154
1171
let input = read ( 'webkit-line-clamp' )
1155
1172
let result = postcss ( [ cleaner ] ) . process ( input )
0 commit comments