Closed bitfyre closed 8 years ago
Rework regex patterns for mixins and includes with parameters that span multiple lines. The following mixin:
.drop-shadow( @x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1 ) { -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); }
should convert to:
@mixin drop-shadow( $x-axis: 0, $y-axis: 1px, $blur: 2px, $alpha: 0.1 ) { -webkit-box-shadow: $x-axis $y-axis $blur rgba(0, 0, 0, $alpha); -moz-box-shadow: $x-axis $y-axis $blur rgba(0, 0, 0, $alpha); box-shadow: $x-axis $y-axis $blur rgba(0, 0, 0, $alpha); }
The following include:
.drop-shadow( 0, 2px, 4px, 0.4 );
@include drop-shadow( 0, 2px, 4px, 0.4 );
The conversion should also respect the original's level of indentation. This conversion will also convert name spaced mixins like the following:
#grid { .column(…) {…}; }
to:
#grid { @mixin column(…) {…}; }
This won't compile with any of the existing sass compliers, but is much closer than previously.
Wow. A year ago. Better late than never???
Thanks @bitfyre!
Rework regex patterns for mixins and includes with parameters that span multiple lines. The following mixin:
should convert to:
The following include:
should convert to:
The conversion should also respect the original's level of indentation. This conversion will also convert name spaced mixins like the following:
to:
This won't compile with any of the existing sass compliers, but is much closer than previously.