Skip to content

Commit

Permalink
new file linear-gradient
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Harvey committed May 4, 2016
1 parent 6724092 commit 562f09c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/__tool.fallback.gradient.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
// CHANGED: DEPRECATED. use `linear-gradient` name below.
///////////////////////////////////////////////////////////////////////////////
.gradient(@arg) {
.linear-gradient(@arg);
}

.linear-gradient(@arg) {
background-image: -webkit-linear-gradient(@arg);
background-image: -moz-linear-gradient(@arg);
background-image: -ms-linear-gradient(@arg);
Expand Down
30 changes: 30 additions & 0 deletions src/__tool.fallback.linear-gradient.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

/*################################*\
xmeter | __tool.fallback.linear-gradient.less
\*################################*/


// Applies a single linear gradient background on an element.
// This is an unusual property in that a single css value list is comprised
// of comma-separated values (unlike normal css value lists which are space-separated).
// Thus when you call the mixin, you must append a dummy semicolon at the end of your argument.
// If you do not, Less will interpret the commas as argument separators.
//
// See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient) for more info.
// See [WPD](http://docs.webplatform.org/wiki/css/functions/linear-gradient) for more info.
//
// ^params
// : @arg - a list of comma-separated components (each as a component of one gradient value).
// Must be terminated with a semicolon (;).
// ^author
// : Chris Harvey
// ^updated
// : 2014-07-08
.linear-gradient(@arg) {
background-image: -webkit-linear-gradient(@arg);
background-image: -moz-linear-gradient(@arg);
background-image: -ms-linear-gradient(@arg);
background-image: -o-linear-gradient(@arg);
background-image: linear-gradient(@arg);
background-image: -webkit-gradient(@arg); // "Old Webkit"
}

0 comments on commit 562f09c

Please sign in to comment.