Skip to content

Instantly share code, notes, and snippets.

@cdmz
Created July 31, 2015 11:28
Show Gist options
  • Save cdmz/bf625e8dc01e0d9de2db to your computer and use it in GitHub Desktop.
Save cdmz/bf625e8dc01e0d9de2db to your computer and use it in GitHub Desktop.
Mixin gradiente vertical LESS
.vertical(@startColor: #555, @endColor: #333) {
background-color: mix(@startColor, @endColor, 60%);
background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
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: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
background-image: linear-gradient(to bottom, @startColor, @endColor); // 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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment