Created
July 25, 2014 15:58
-
-
Save Phunky/4ed9eb781aeac19875d4 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<h1>YELLOW?</h1> | |
<div class="cyan">Cyan</div> | |
<div class="magenta">Magenta</div> | |
<div class="yellow">Yellow</div> | |
<div class="key">Key</div> |
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
// ---- | |
// Sass (v3.3.10) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
$colours: ( | |
cyan: #00ffff, | |
magenta: #ff00ff, | |
yellow: #ffff00, | |
key: #000, | |
); | |
@function colour($name){ | |
@return map-get($colours, $name); | |
} | |
@each $name, $value in $colours { | |
[class$="#{$name}"]{ | |
background-color: $value; | |
color: #fff; | |
} | |
} | |
h1 { | |
background: colour(yellow); | |
color: colour(magenta); | |
border: 5px solid colour(cyan); | |
} | |
div { | |
font-family: sans-serif; | |
font-size: 2em; | |
padding: 1em; | |
} |
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
[class$="cyan"] { | |
background-color: cyan; | |
color: #fff; | |
} | |
[class$="magenta"] { | |
background-color: magenta; | |
color: #fff; | |
} | |
[class$="yellow"] { | |
background-color: yellow; | |
color: #fff; | |
} | |
[class$="key"] { | |
background-color: black; | |
color: #fff; | |
} | |
h1 { | |
background: yellow; | |
color: magenta; | |
border: 5px solid cyan; | |
} | |
div { | |
font-family: sans-serif; | |
font-size: 2em; | |
padding: 1em; | |
} |
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
<h1>YELLOW?</h1> | |
<div class="cyan">Cyan</div> | |
<div class="magenta">Magenta</div> | |
<div class="yellow">Yellow</div> | |
<div class="key">Key</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment