Skip to content

Instantly share code, notes, and snippets.

@lisaq
Created July 16, 2014 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lisaq/391fb4687396294cd1ab to your computer and use it in GitHub Desktop.
Save lisaq/391fb4687396294cd1ab to your computer and use it in GitHub Desktop.
LESS mixin fo light to dark opacity background gradient
/* light to dark opacity background gradient */
.opacity-gradient (@opacityfrom:0, @opacityto:1) {
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(54,54,54,@opacityfrom)), color-stop(100%,rgba(54,54,54,@opacityto)));
background: -webkit-linear-gradient(left, rgba(54,54,54,@opacityfrom) 0%,rgba(54,54,54,@opacityto) 100%);
background: -moz-linear-gradient(left, rgba(54,54,54,@opacityfrom) 0%,rgba(54,54,54,@opacityto) 100%);
background: -ms-linear-gradient(left, rgba(54,54,54,@opacityfrom) 0%,rgba(54,54,54,@opacityto) 100%);
background: -o-linear-gradient(left, rgba(54,54,54,@opacityfrom) 0%,rgba(54,54,54,@opacityto) 100%);
background: linear-gradient(to right, rgba(54,54,54,@opacityfrom) 0%,rgba(54,54,54,@opacityto) 100%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment