From 2428904b4b2c293525b3a13bbe88ac60d9c7d5c2 Mon Sep 17 00:00:00 2001 From: Francisco arenas Date: Thu, 24 Jan 2013 03:37:52 -0200 Subject: [PATCH 1/2] Update less/mixins.less horizontal three color gradient added --- less/mixins.less | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/less/mixins.less b/less/mixins.less index b734bab2dc..6980ab3cfd 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -437,6 +437,17 @@ background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10 background-image: linear-gradient(@deg, @startColor, @endColor); // Standard, IE10 } + .horizontal-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { + background-color: mix(@midColor, @endColor, 80%); + background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); + background-image: -webkit-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); + background-image: -moz-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); + background-image: -o-linear-gradient(left, @startColor, @midColor @colorStop, @endColor); + background-image: linear-gradient(to right, @startColor, @midColor @colorStop, @endColor); + background-repeat: no-repeat; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback + } + .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { background-color: mix(@midColor, @endColor, 80%); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); From d2ea2cdeddbfda468f9d972e7d76c29525bd7cd5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 1 Feb 2013 21:41:02 -0800 Subject: [PATCH 2/2] add horizontal-three-color gradient test --- less/tests/css-tests.css | 13 ++++++++++++- less/tests/css-tests.html | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/less/tests/css-tests.css b/less/tests/css-tests.css index 9edaf69bfb..0f5604ee68 100644 --- a/less/tests/css-tests.css +++ b/less/tests/css-tests.css @@ -136,4 +136,15 @@ body { background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} \ No newline at end of file +} + +.gradient-horizontal-three { + background-color: #00b3ee; + background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(#00b3ee), color-stop(50%, #7a43b6), to(#c3325f)); + background-image: -webkit-linear-gradient(left, #00b3ee, #7a43b6 50%, #c3325f); + background-image: -moz-linear-gradient(left, #00b3ee, #7a43b6 50%, #c3325f); + background-image: -o-linear-gradient(left, #00b3ee, #7a43b6 50%, #c3325f); + background-image: linear-gradient(to right, #00b3ee, #7a43b6 50%, #c3325f); + background-repeat: no-repeat; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00b3ee', endColorstr='#c3325f', GradientType=0); +} diff --git a/less/tests/css-tests.html b/less/tests/css-tests.html index 035ba8bd44..98496b7620 100644 --- a/less/tests/css-tests.html +++ b/less/tests/css-tests.html @@ -1291,6 +1291,9 @@

Striped

+

Horizontal three colors

+
+