Created
April 2, 2014 14:08
-
-
Save daphotron/9934911 to your computer and use it in GitHub Desktop.
Using SASS maps http://sassmeister.com/gist/9934911
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="swatch swatch-accent"> | |
| $color-accent: #4E90C7 | |
| </div> | |
| <div class="swatch swatch-border"> | |
| $color-border: #dadada | |
| </div> | |
| <div class="swatch swatch-bg-body"> | |
| $color-bg-body: #fefefe | |
| </div> | |
| <div class="swatch swatch-bg-copy"> | |
| $color-bg-copy: #ececec | |
| </div> | |
| <div class="swatch swatch-focus"> | |
| $color-focus: #fcfcfc | |
| </div> | |
| <div class="swatch swatch-text"> | |
| $color-text: #444 | |
| </div> | |
| <div class="swatch swatch-text-light"> | |
| $color-text-light: #fbfbfb | |
| </div> | |
| <div class="swatch swatch-link"> | |
| $color-link: #66B9FF | |
| </div> | |
| <div class="swatch swatch-link-hover"> | |
| $color-link-hover: #004c99 | |
| </div> | |
| <div class="swatch swatch-error"> | |
| $color-error: #E05858 | |
| </div> | |
| <div class="swatch swatch-notice"> | |
| $color-notice: #ffffee | |
| </div> |
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.3.4) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| @import "compass"; | |
| .swatch { | |
| display: inline-block; | |
| height: 6em; | |
| margin: 0 1.5em 1.5em 0; | |
| overflow: hidden; | |
| padding: 1em; | |
| position: relative; | |
| width: 10em; | |
| } | |
| $colors: ( | |
| accent: #4E90C7, | |
| border: #dadada, | |
| border-light: #f1f1f1, | |
| border-tabs: #dadada, | |
| text: #444, | |
| text-light: #fbfbfb, | |
| link: #66B9FF, | |
| link-hover: #004c99, | |
| bg-header: #fefefe, | |
| bg-body: #fefefe, | |
| bg-copy: #ececec, | |
| bg-focus: #fcfcfc, | |
| error: #E05858, | |
| notice: #209609, | |
| bg-notice: #ffffee | |
| ); | |
| @each $color, $bgcolor in $colors { | |
| .swatch-#{$color} { | |
| @include contrasted($bgcolor); | |
| } | |
| } |
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
| .swatch { | |
| display: inline-block; | |
| height: 6em; | |
| margin: 0 1.5em 1.5em 0; | |
| overflow: hidden; | |
| padding: 1em; | |
| position: relative; | |
| width: 10em; | |
| } | |
| .swatch-accent { | |
| background-color: #4e90c7; | |
| color: black; | |
| } | |
| .swatch-border { | |
| background-color: #dadada; | |
| color: black; | |
| } | |
| .swatch-border-light { | |
| background-color: #f1f1f1; | |
| color: black; | |
| } | |
| .swatch-border-tabs { | |
| background-color: #dadada; | |
| color: black; | |
| } | |
| .swatch-text { | |
| background-color: #444444; | |
| color: white; | |
| } | |
| .swatch-text-light { | |
| background-color: #fbfbfb; | |
| color: black; | |
| } | |
| .swatch-link { | |
| background-color: #66b9ff; | |
| color: black; | |
| } | |
| .swatch-link-hover { | |
| background-color: #004c99; | |
| color: white; | |
| } | |
| .swatch-bg-header { | |
| background-color: #fefefe; | |
| color: black; | |
| } | |
| .swatch-bg-body { | |
| background-color: #fefefe; | |
| color: black; | |
| } | |
| .swatch-bg-copy { | |
| background-color: #ececec; | |
| color: black; | |
| } | |
| .swatch-bg-focus { | |
| background-color: #fcfcfc; | |
| color: black; | |
| } | |
| .swatch-error { | |
| background-color: #e05858; | |
| color: black; | |
| } | |
| .swatch-notice { | |
| background-color: #209609; | |
| color: white; | |
| } | |
| .swatch-bg-notice { | |
| background-color: #ffffee; | |
| color: black; | |
| } |
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="swatch swatch-accent"> | |
| $color-accent: #4E90C7 | |
| </div> | |
| <div class="swatch swatch-border"> | |
| $color-border: #dadada | |
| </div> | |
| <div class="swatch swatch-bg-body"> | |
| $color-bg-body: #fefefe | |
| </div> | |
| <div class="swatch swatch-bg-copy"> | |
| $color-bg-copy: #ececec | |
| </div> | |
| <div class="swatch swatch-focus"> | |
| $color-focus: #fcfcfc | |
| </div> | |
| <div class="swatch swatch-text"> | |
| $color-text: #444 | |
| </div> | |
| <div class="swatch swatch-text-light"> | |
| $color-text-light: #fbfbfb | |
| </div> | |
| <div class="swatch swatch-link"> | |
| $color-link: #66B9FF | |
| </div> | |
| <div class="swatch swatch-link-hover"> | |
| $color-link-hover: #004c99 | |
| </div> | |
| <div class="swatch swatch-error"> | |
| $color-error: #E05858 | |
| </div> | |
| <div class="swatch swatch-notice"> | |
| $color-notice: #ffffee | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment