Created
November 27, 2015 16:14
-
-
Save CheetoMao/cfcecb740ebef9ca496f 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
<div class="Flash Flash--warning">Here is a warning!</div> | |
<div class="Flash Flash--info">Boring info.</div> | |
<div class="Flash Flash--success">You did something right!</div> | |
<div class="Flash Flash--danger">DANGER!</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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
//pre-existing color vars | |
$warning: orange; | |
$info: blue; | |
$success: green; | |
$danger: red; | |
// teensy bit o'styling | |
.Flash { | |
color: white; | |
display: block; | |
font-family: "Helvetica", sans-serif; | |
padding: 20px; | |
text-transform: uppercase; | |
} | |
// flash list | |
$flashes: (warning $warning), | |
(info $info), | |
(success $success), | |
(danger $danger); | |
// part that makes it work | |
@each $status in $flashes { | |
.Flash--#{nth($status, 1)} { | |
background: nth($status, 2); | |
} | |
} |
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
.Flash { | |
color: white; | |
display: block; | |
font-family: "Helvetica", sans-serif; | |
padding: 20px; | |
text-transform: uppercase; | |
} | |
.Flash--warning { | |
background: orange; | |
} | |
.Flash--info { | |
background: blue; | |
} | |
.Flash--success { | |
background: green; | |
} | |
.Flash--danger { | |
background: red; | |
} |
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="Flash Flash--warning">Here is a warning!</div> | |
<div class="Flash Flash--info">Boring info.</div> | |
<div class="Flash Flash--success">You did something right!</div> | |
<div class="Flash Flash--danger">DANGER!</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment