Skip to content

Commit

Permalink
Little bit of gradients
Browse files Browse the repository at this point in the history
  • Loading branch information
neoascetic committed Jul 30, 2012
1 parent a7ac3e8 commit c898145
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions css3.less
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,41 @@
-moz-box-sizing: @box-sizing;
box-sizing: @box-sizing;
}


//
// Gradients
// (in Compass it is part of Images framework)
//
.linear-gradient(@start, @stop) {
background: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, @start),
color-stop(1, @stop));

background: -ms-linear-gradient(
top,
@start,
@stop);

background: -moz-linear-gradient(
center top,
@start 0%,
@stop 100%);

background: linear-gradient(top, @start, @stop);
}

.linear-gradient(@start, @stop, @fallback) {
background: @fallback;
.linear-gradient(@start, @stop);
}

.linear-grayscale-gradient(@start: 0, @stop: 255, @fallback: black) {
@from: rgb(@start, @start, @start);
@to: rgb(@stop, @stop, @stop);

.linear-gradient(@from, @to, @fallback);
}

0 comments on commit c898145

Please sign in to comment.