Created
June 23, 2015 15:33
-
-
Save jdsteinbach/0c0cd4c3d3d857d3a719 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
| .brand-red I'm red! | |
| .brand-blue I'm blue! | |
| .brand-orange I'm orange! | |
| .brand-yellow I'm yellow! |
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.14) | |
| // Compass (v1.0.3) | |
| // ---- | |
| $colors: ( | |
| brand-red: red, | |
| brand-blue: blue, | |
| brand-orange: orange, | |
| brand-yellow: yellow | |
| ); | |
| div { | |
| padding: .5em; | |
| margin: 1em auto; | |
| font-weight: bold; | |
| } | |
| @each $label, $value in $colors { | |
| .#{$label} { | |
| color: $value; | |
| $lv: lightness($value); | |
| lightness: lightness($value); | |
| border: 1em solid lighten($value, $lv*.25); | |
| border-bottom-color: lighten($value, max(lightness($value) * 1.2 - lightness($value), 10%)); | |
| } | |
| } |
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
| div { | |
| padding: .5em; | |
| margin: 1em auto; | |
| font-weight: bold; } | |
| .brand-red { | |
| color: red; | |
| lightness: 50%; | |
| border: 1em solid #ff4040; | |
| border-bottom-color: #ff3333; } | |
| .brand-blue { | |
| color: blue; | |
| lightness: 50%; | |
| border: 1em solid #4040ff; | |
| border-bottom-color: #3333ff; } | |
| .brand-orange { | |
| color: orange; | |
| lightness: 50%; | |
| border: 1em solid #ffbc40; | |
| border-bottom-color: #ffb733; } | |
| .brand-yellow { | |
| color: yellow; | |
| lightness: 50%; | |
| border: 1em solid #ffff40; | |
| border-bottom-color: #ffff33; } |
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
| <div class="brand-red">I'm red!</div> | |
| <div class="brand-blue">I'm blue!</div> | |
| <div class="brand-orange">I'm orange!</div> | |
| <div class="brand-yellow">I'm yellow!</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment