Skip to content

Instantly share code, notes, and snippets.

@wingsline
Created October 5, 2012 00:21
Show Gist options
  • Save wingsline/3837300 to your computer and use it in GitHub Desktop.
Save wingsline/3837300 to your computer and use it in GitHub Desktop.
LESS: button gradient mixin
.button-gradient (@start, @end) {
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, @start), color-stop(1, @end) );
background: -webkit-linear-gradient(top, @start 5%, @end 100% );
background: -moz-linear-gradient(top, @start 5%, @end 100% );
background: -o-linear-gradient(top, @start 5%, @end 100% );
background: -ms-linear-gradient(top, @start 5%, @end 100% );
background: linear-gradient(top, @start 5%, @end 100% );
background-color: @start;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@{start}', endColorstr='@{end}');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment