File tree Expand file tree Collapse file tree 3 files changed +29
-4
lines changed
test/test-cases/export-keyframes Expand file tree Collapse file tree 3 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -238,17 +238,26 @@ const plugin = (options = {}) => {
238238
239239 tokens = tokens . map ( ( token , idx ) => {
240240 if ( idx === 0 || tokens [ idx - 1 ] === "," ) {
241+ let result = token ;
242+
241243 const localMatch = / ^ ( \s * ) : l o c a l \s * \( ( .+ ?) \) / . exec ( token ) ;
244+ const nextLocalMatch = / : l o c a l \s * \( ( .+ ?) \) / . exec ( token ) ;
242245
243246 if ( localMatch ) {
244- return (
247+ result =
245248 localMatch [ 1 ] +
246249 exportScopedName ( localMatch [ 2 ] ) +
247- token . substr ( localMatch [ 0 ] . length )
248- ) ;
250+ token . substr ( localMatch [ 0 ] . length ) ;
251+ } else if ( nextLocalMatch ) {
252+ const input = nextLocalMatch . input ;
253+ const matchPattern = nextLocalMatch [ 0 ] ;
254+ const matchVal = nextLocalMatch [ 1 ] ;
255+ const newVal = exportScopedName ( matchVal ) ;
256+ result = input . replace ( matchPattern , newVal ) ;
249257 } else {
250- return token ;
258+ // do nothing
251259 }
260+ return result ;
252261 } else {
253262 return token ;
254263 }
Original file line number Diff line number Diff line change 1717 animation-name : _input__fade-in;
1818}
1919
20+ ._input__fadeIn {
21+ animation : 2s _input__fade-in;
22+ }
23+
24+ ._input__fadeIn {
25+ animation : _input__fade-in 2s ;
26+ }
27+
2028: export {
2129 fadeIn : _input__fadeIn;
2230 fade-in : _input__fade-in;
Original file line number Diff line number Diff line change 1616: local (.fadeIn ) {
1717 animation-name : _colon_local (fade-in);
1818}
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