Skip to content

Instantly share code, notes, and snippets.

@CheetoMao
Created November 24, 2015 21:13
Show Gist options
  • Save CheetoMao/71a4e9cc176b8030e7f2 to your computer and use it in GitHub Desktop.
Save CheetoMao/71a4e9cc176b8030e7f2 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<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>
// ----
// libsass (v3.2.5)
// ----
$warning: orange;
$info: blue;
$success: green;
$danger: red;
$flashes: (warning $warning),
(info $info),
(success $success),
(danger $danger);
@each $status in $flashes {
.Flash--#{nth($status, 1)} {
background: nth($status, 2);
}
}
.Flash--warning {
background: orange;
}
.Flash--info {
background: blue;
}
.Flash--success {
background: green;
}
.Flash--danger {
background: red;
}
<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