Last active
August 29, 2015 14:09
-
-
Save jdsteinbach/b687d319b542d0fadb17 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
| .light-body Donec id elit non mi porta gravida at eget metus. | |
| .dark-body Donec id elit non mi porta gravida at eget metus. | |
| .blue-body Donec id elit non mi porta gravida at eget metus. |
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.7) | |
| // Compass (v1.0.1) | |
| // ---- | |
| $orange: #F36B21; | |
| $blue: #383B52; | |
| $background-dark: #222; | |
| $background-light: #fff; | |
| @mixin rgba-fallback($property, $color, $opacity, $background: light) { | |
| $background-color: $background-light; | |
| @if $background == dark { | |
| $background-color: $background-dark; | |
| } @elseif type-of($background) == color { | |
| $background-color: $background; | |
| } | |
| #{$property}: mix($color, $background-color, ($opacity*100%)); | |
| #{$property}: rgba($color, $opacity); | |
| } | |
| div { | |
| margin: 1em; | |
| padding: 1em; | |
| width: 10em; | |
| border: 1px solid $orange; | |
| float: left; | |
| } | |
| .light-body { | |
| background: $background-light; | |
| @include rgba-fallback(color, $orange, .75); | |
| } | |
| .dark-body { | |
| background: $background-dark; | |
| @include rgba-fallback(color, $orange, .75, dark); | |
| } | |
| .blue-body { | |
| background: $blue; | |
| @include rgba-fallback(color, $orange, .75, $blue); | |
| } |
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 { | |
| margin: 1em; | |
| padding: 1em; | |
| width: 10em; | |
| border: 1px solid #F36B21; | |
| float: left; | |
| } | |
| .light-body { | |
| background: #fff; | |
| color: #f69058; | |
| color: rgba(243, 107, 33, 0.75); | |
| } | |
| .dark-body { | |
| background: #222; | |
| color: #be5821; | |
| color: rgba(243, 107, 33, 0.75); | |
| } | |
| .blue-body { | |
| background: #383B52; | |
| color: #c45f2d; | |
| color: rgba(243, 107, 33, 0.75); | |
| } |
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='light-body'>Donec id elit non mi porta gravida at eget metus.</div> | |
| <div class='dark-body'>Donec id elit non mi porta gravida at eget metus.</div> | |
| <div class='blue-body'>Donec id elit non mi porta gravida at eget metus.</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment