Created
December 22, 2014 18:26
-
-
Save cimmanon/88c7a0fe68ed89d4ea07 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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
<button>Foo</button> |
This file contains hidden or 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
// ---- | |
// Sass (v3.4.9) | |
// Compass (v1.0.1) | |
// ---- | |
$colors: #C3E279, #F7FEC8, #FFD069, #F27669, #DC9CBE, #C59AE0, #969DCC; | |
@function hard-stops($colors...) { | |
@if length($colors) == 1 { | |
$colors: nth($colors, 1); | |
} | |
$position: 0; | |
$stops: (); | |
@each $c in $colors { | |
$stops: append($stops, $c $position, comma); | |
$position: $position + (100% / length($colors)); | |
$stops: append($stops, $c $position); | |
} | |
@return $stops; | |
} | |
body:before { | |
content: ''; | |
height: 5px; | |
display: block; | |
background: linear-gradient(to right, hard-stops($colors)); | |
} |
This file contains hidden or 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
body:before { | |
content: ''; | |
height: 5px; | |
display: block; | |
background: linear-gradient(to right, #C3E279 0, #C3E279 14.28571%, #F7FEC8 14.28571%, #F7FEC8 28.57143%, #FFD069 28.57143%, #FFD069 42.85714%, #F27669 42.85714%, #F27669 57.14286%, #DC9CBE 57.14286%, #DC9CBE 71.42857%, #C59AE0 71.42857%, #C59AE0 85.71429%, #969DCC 85.71429%, #969DCC 100.0%); | |
} |
This file contains hidden or 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
<button>Foo</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment