Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from slang800/gradients
Gradients
- Loading branch information
Showing
7 changed files
with
160 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,76 @@ | ||
body { | ||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); | ||
background: -webkit-linear-gradient(top, #fff 0, #000 100%); | ||
background: -moz-linear-gradient(top, #fff 0, #000 100%); | ||
background: -o-linear-gradient(top, #fff 0, #000 100%); | ||
background: -ms-linear-gradient(top, #fff 0, #000 100%); | ||
background: linear-gradient(top, #fff 0, #000 100%); | ||
background: -webkit-linear-gradient(#fff, #000 100%); | ||
background: -moz-linear-gradient(#fff, #000 100%); | ||
background: -o-linear-gradient(#fff, #000 100%); | ||
background: -ms-linear-gradient(#fff, #000 100%); | ||
background: linear-gradient(#fff, #000 100%); | ||
} | ||
body { | ||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); | ||
background: -webkit-linear-gradient(top, #fff 0, #000 100%); | ||
background: -moz-linear-gradient(top, #fff 0, #000 100%); | ||
background: -o-linear-gradient(top, #fff 0, #000 100%); | ||
background: -ms-linear-gradient(top, #fff 0, #000 100%); | ||
background: linear-gradient(top, #fff 0, #000 100%); | ||
} | ||
body { | ||
background: -webkit-gradient(linear, left top, right bottom, color-stop(0, #fff), color-stop(0.25, #f00), color-stop(0.5, #00f), color-stop(1, #000)); | ||
background: -webkit-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); | ||
background: -moz-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); | ||
background: -o-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); | ||
background: -ms-linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); | ||
background: linear-gradient(top left, #fff 0, #f00 25%, #00f 50%, #000 100%); | ||
} | ||
body { | ||
background: -webkit-gradient(linear, right bottom, left top, color-stop(0, #fff), color-stop(0.8, #000)); | ||
background: -webkit-linear-gradient(bottom right, #fff 0, #000 80%); | ||
background: -moz-linear-gradient(bottom right, #fff 0, #000 80%); | ||
background: -o-linear-gradient(bottom right, #fff 0, #000 80%); | ||
background: -ms-linear-gradient(bottom right, #fff 0, #000 80%); | ||
background: linear-gradient(bottom right, #fff 0, #000 80%); | ||
} | ||
body { | ||
background: -webkit-gradient(linear, right bottom, left top, color-stop(0, #fff), color-stop(0.8, #000)); | ||
background: -webkit-linear-gradient(right bottom, #fff 0, #000 80%); | ||
background: -moz-linear-gradient(right bottom, #fff 0, #000 80%); | ||
background: -o-linear-gradient(right bottom, #fff 0, #000 80%); | ||
background: -ms-linear-gradient(right bottom, #fff 0, #000 80%); | ||
background: linear-gradient(right bottom, #fff 0, #000 80%); | ||
} | ||
body { | ||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)); | ||
background: -webkit-linear-gradient(top, #fff 0, #000 100%); | ||
background: -moz-linear-gradient(top, #fff 0, #000 100%); | ||
background: -ms-linear-gradient(top, #fff 0, #000 100%); | ||
background: -o-linear-gradient(top, #fff 0, #000 100%); | ||
background: linear-gradient(top, #fff 0, #000 100%); | ||
} | ||
body { | ||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #000)), #fff; | ||
background: -webkit-linear-gradient(top, #fff 0, #000 100%), #fff; | ||
background: -moz-linear-gradient(top, #fff 0, #000 100%), #fff; | ||
background: -ms-linear-gradient(top, #fff 0, #000 100%), #fff; | ||
background: -o-linear-gradient(top, #fff 0, #000 100%), #fff; | ||
background: linear-gradient(top, #fff 0, #000 100%), #fff; | ||
} | ||
body { | ||
-webkit-border-image: -webkit-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; | ||
-moz-border-image: -moz-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; | ||
-o-border-image: -o-linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; | ||
border-image: linear-gradient(top, #fff 0, #000 100%) 20% stretch stretch; | ||
} | ||
body { | ||
cursor: -webkit-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
cursor: -moz-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
cursor: -ms-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
cursor: -o-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
cursor: linear-gradient(40deg, #f00 0, #0f0 100%); | ||
} | ||
body { | ||
list-style: -webkit-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
list-style: -moz-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
list-style: -ms-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
list-style: -o-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
list-style: linear-gradient(40deg, #f00 0, #0f0 100%); | ||
} | ||
body { | ||
list-style-image: -webkit-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
list-style-image: -moz-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
list-style-image: -ms-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
list-style-image: -o-linear-gradient(40deg, #f00 0, #0f0 100%); | ||
list-style-image: linear-gradient(40deg, #f00 0, #0f0 100%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.test1 { | ||
background: -webkit-linear-gradient(top, #fff 0, #000 100%), -webkit-linear-gradient(bottom, #000 0, #fff 100%); | ||
background: -moz-linear-gradient(top, #fff 0, #000 100%), -moz-linear-gradient(bottom, #000 0, #fff 100%); | ||
background: -o-linear-gradient(top, #fff 0, #000 100%), -o-linear-gradient(bottom, #000 0, #fff 100%); | ||
background: -ms-linear-gradient(top, #fff 0, #000 100%), -ms-linear-gradient(bottom, #000 0, #fff 100%); | ||
background: linear-gradient(top, #fff 0, #000 100%), linear-gradient(bottom, #000 0, #fff 100%); | ||
} | ||
.test2 { | ||
background: #fff -webkit-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -webkit-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; | ||
background: #fff -moz-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -moz-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; | ||
background: #fff -o-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -o-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; | ||
background: #fff -ms-linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, -ms-linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; | ||
background: #fff linear-gradient(top, #000 0, #fff 100%) 0 0 no-repeat, linear-gradient(bottom, #000 0, #fff 100%) 10px bottom repeat-y; | ||
} | ||
.test3 { | ||
background-image: -webkit-linear-gradient(top, #fff 0, #000 100%), url("a.png"), -webkit-linear-gradient(bottom, #000 0, #fff 100%); | ||
background-image: -moz-linear-gradient(top, #fff 0, #000 100%), url("a.png"), -moz-linear-gradient(bottom, #000 0, #fff 100%); | ||
background-image: -o-linear-gradient(top, #fff 0, #000 100%), url("a.png"), -o-linear-gradient(bottom, #000 0, #fff 100%); | ||
background-image: -ms-linear-gradient(top, #fff 0, #000 100%), url("a.png"), -ms-linear-gradient(bottom, #000 0, #fff 100%); | ||
background-image: linear-gradient(top, #fff 0, #000 100%), url("a.png"), linear-gradient(bottom, #000 0, #fff 100%); | ||
} | ||
.test4 { | ||
background: -webkit-linear-gradient(bottom, #000 0, #fff 100%), -webkit-linear-gradient(top, #fff 0, #000 100%); | ||
background: -moz-linear-gradient(bottom, #000 0, #fff 100%), -moz-linear-gradient(top, #fff 0, #000 100%); | ||
background: -o-linear-gradient(bottom, #000 0, #fff 100%), -o-linear-gradient(top, #fff 0, #000 100%); | ||
background: -ms-linear-gradient(bottom, #000 0, #fff 100%), -ms-linear-gradient(top, #fff 0, #000 100%); | ||
background: linear-gradient(bottom, #000 0, #fff 100%), linear-gradient(top, #fff 0, #000 100%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
@import 'nib/vendor' | ||
@import 'nib/gradients' | ||
|
||
.test1 | ||
background: linear-gradient(top, white, black), | ||
linear-gradient(bottom, black, white) | ||
|
||
.test2 | ||
background: #fff \ | ||
linear-gradient(top, black, white) 0 0 no-repeat, | ||
linear-gradient(bottom, black, white) 10px bottom repeat-y | ||
|
||
.test3 | ||
background-image: linear-gradient(top, white, black), | ||
url(a.png), | ||
linear-gradient(bottom, black, white) | ||
|
||
gradient1 = linear-gradient(top, white, black) | ||
gradient2 = linear-gradient(bottom, black, white) | ||
|
||
.test4 | ||
background: gradient2, gradient1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
|
||
@import 'nib/vendor' | ||
@import 'nib/gradients' | ||
|
||
vendor-prefixes = webkit moz official | ||
|
||
|