Skip to content

Instantly share code, notes, and snippets.

@blaswan
Created October 17, 2013 03:54
Show Gist options
  • Save blaswan/7019018 to your computer and use it in GitHub Desktop.
Save blaswan/7019018 to your computer and use it in GitHub Desktop.
Top to bottom gradient Mixin in less
.top-to-bottom-gradient (@top-color, @bottom-color) {
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(@top-color), to(@bottom-color)); /* Safari 4-5, Chrome 1-9 */
background: -webkit-linear-gradient(top, @top-color, @bottom-color); /* Safari 5.1, Chrome 10+ */
background: -moz-linear-gradient(top, @top-color, @bottom-color); /* Firefox 3.6+ */
background: -ms-linear-gradient(top, @top-color, @bottom-color); /* IE 10 */
background: -o-linear-gradient(top, @top-color, @bottom-color); /* Opera 11.10+ */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment