1
0
Fork 0
mirror of https://github.com/twbs/bootstrap-sass.git synced 2022-11-09 12:27:02 -05:00

converter: fix multiparameter mixin definitions

This commit is contained in:
Gleb Mazovetskiy 2013-07-30 18:02:33 +02:00
parent b1b6b4254d
commit 5398ae9f54
2 changed files with 5 additions and 3 deletions

View file

@ -147,7 +147,9 @@ private
end
def replace_mixin_file(less)
less.gsub(/^(\s*)\.([\w-]+\(.*\))(\s*{)/, '\1@mixin \2\3')
less.gsub(/^(\s*)\.([\w-]+\(.*\))(\s*\{)/) { |match|
"#{$1}@mixin #{$2.tr(';', ',')}#{$3}"
}
end
def replace_vars(less)

View file

@ -235,7 +235,7 @@
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
@mixin horizontal($start-color: #555; $start-percent: 0%; $end-color: #333; $end-percent: 100%) {
@mixin horizontal($start-color: #555, $start-percent: 0%, $end-color: #333, $end-percent: 100%) {
background-color: $end-color;
background-image: -webkit-gradient(linear, $start-percent top, $end-percent top, from($start-color), to($end-color)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(left, color-stop($start-color $start-percent), color-stop($end-color $end-percent)); // Safari 5.1+, Chrome 10+
@ -249,7 +249,7 @@
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
@mixin vertical($start-color: #555; $start-percent: 0%; $end-color: #333; $end-percent: 100%) {
@mixin vertical($start-color: #555, $start-percent: 0%, $end-color: #333, $end-percent: 100%) {
background-color: $end-color;
background-image: -webkit-gradient(linear, left $start-percent, left $end-percent, from($start-color), to($end-color)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(top, $start-color, $start-percent, $end-color, $end-percent); // Safari 5.1+, Chrome 10+