From 230d6de88aac73077a01f3d66d2bd498d553cb7e Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Tue, 21 May 2013 16:25:59 -0400 Subject: [PATCH 1/2] Vertical gradients now can have percentages passed in as arguments to allow finer control over the backgrounds it produces --- less/mixins.less | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/less/mixins.less b/less/mixins.less index b54b05c4ee..779e121a92 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -255,12 +255,12 @@ background-repeat: repeat-x; filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down } - .vertical(@startColor: #555, @endColor: #333) { + .vertical(@startColor: #555, @endColor: #333, @startPercent: 0%, @endPercent: 100%) { background-color: @endColor; - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ - background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ - background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ - background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 + background-image: -webkit-gradient(linear, 0 @startPercent, 0 @endPercent, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @startColor, @startPercent, @endColor, @endPercent); // Safari 5.1+, Chrome 10+ + background-image: -moz-linear-gradient(top, @startColor @startPercent, @endColor @endPercent); // FF 3.6+ + background-image: linear-gradient(to bottom, @startColor @startPercent, @endColor @endPercent); // Standard, IE10 background-repeat: repeat-x; filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down } From c47d9932cb8a9d8dedf900f62918e70f7a1f5a50 Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Tue, 21 May 2013 16:29:35 -0400 Subject: [PATCH 2/2] Found editor spacing issues with tabs instead of spaces, formatting to fit the entrance criteria --- less/mixins.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/less/mixins.less b/less/mixins.less index 779e121a92..bdd787166f 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -257,8 +257,8 @@ } .vertical(@startColor: #555, @endColor: #333, @startPercent: 0%, @endPercent: 100%) { background-color: @endColor; - background-image: -webkit-gradient(linear, 0 @startPercent, 0 @endPercent, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ - background-image: -webkit-linear-gradient(top, @startColor, @startPercent, @endColor, @endPercent); // Safari 5.1+, Chrome 10+ + background-image: -webkit-gradient(linear, 0 @startPercent, 0 @endPercent, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @startColor, @startPercent, @endColor, @endPercent); // Safari 5.1+, Chrome 10+ background-image: -moz-linear-gradient(top, @startColor @startPercent, @endColor @endPercent); // FF 3.6+ background-image: linear-gradient(to bottom, @startColor @startPercent, @endColor @endPercent); // Standard, IE10 background-repeat: repeat-x;