File tree Expand file tree Collapse file tree 3 files changed +30
-2
lines changed
test/test-cases/export-keyframes Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -238,17 +238,29 @@ const plugin = (options = {}) => {
238
238
239
239
tokens = tokens . map ( ( token , idx ) => {
240
240
if ( idx === 0 || tokens [ idx - 1 ] === "," ) {
241
+
242
+ let result = token ;
243
+
241
244
const localMatch = / ^ ( \s * ) : l o c a l \s * \( ( .+ ?) \) / . exec ( token ) ;
245
+ const nextLocalMatch = / : l o c a l \s * \( ( .+ ?) \) / . exec ( token ) ;
242
246
243
247
if ( localMatch ) {
244
- return (
248
+ result = (
245
249
localMatch [ 1 ] +
246
250
exportScopedName ( localMatch [ 2 ] ) +
247
251
token . substr ( localMatch [ 0 ] . length )
248
252
) ;
253
+ } else if ( nextLocalMatch ) {
254
+
255
+ const input = nextLocalMatch . input ;
256
+ const matchPattern = nextLocalMatch [ 0 ] ;
257
+ const matchVal = nextLocalMatch [ 1 ] ;
258
+ const newVal = exportScopedName ( matchVal ) ;
259
+ result = input . replace ( matchPattern , newVal ) ;
249
260
} else {
250
- return token ;
261
+ // do nothing
251
262
}
263
+ return result ;
252
264
} else {
253
265
return token ;
254
266
}
Original file line number Diff line number Diff line change 17
17
animation-name : _input__fade-in;
18
18
}
19
19
20
+ ._input__fadeIn {
21
+ animation : 2s _input__fade-in;
22
+ }
23
+
24
+ ._input__fadeIn {
25
+ animation : _input__fade-in 2s ;
26
+ }
27
+
20
28
: export {
21
29
fadeIn : _input__fadeIn;
22
30
fade-in : _input__fade-in;
Original file line number Diff line number Diff line change 16
16
: local (.fadeIn ) {
17
17
animation-name : _colon_local (fade-in);
18
18
}
19
+
20
+ : local (.fadeIn ) {
21
+ animation : 2s _colon_local (fade-in);
22
+ }
23
+
24
+ : local (.fadeIn ) {
25
+ animation : _colon_local (fade-in) 2s ;
26
+ }
You can’t perform that action at this time.
0 commit comments