]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Vertical gradients now can have percentages passed in as arguments to allow finer...
authorChad Smith <chad.smith@wolfe.com>
Tue, 21 May 2013 20:25:59 +0000 (16:25 -0400)
committerChad Smith <chad.smith@wolfe.com>
Tue, 21 May 2013 20:25:59 +0000 (16:25 -0400)
less/mixins.less

index b54b05c4eeb8fce4190b809486c30526d62961a1..779e121a926341666988d882fc2df9af507a9a29 100644 (file)
     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
   }