Skip to content

Instantly share code, notes, and snippets.

@dphaener
Created March 13, 2015 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dphaener/e3d33a22edf5cb1766b9 to your computer and use it in GitHub Desktop.
Save dphaener/e3d33a22edf5cb1766b9 to your computer and use it in GitHub Desktop.
Flash CSS for Basewise
$base-spacing: 1.5em !default;
$alert-color: #fff6bf !default;
$error-color: #fbe3e4 !default;
$notice-color: #e5edf8 !default;
$success-color: #e6efc2 !default;
@mixin flash($color) {
background-color: $color;
color: darken($color, 60%);
display: block;
font-weight: 600;
margin-bottom: $base-spacing / 2;
padding: $base-spacing / 2;
text-align: center;
a {
color: darken($color, 70%);
text-decoration: underline;
&:focus,
&:hover {
color: darken($color, 90%);
}
}
}
.flash-alert {
@include flash($alert-color);
}
.flash-error {
@include flash($error-color);
}
.flash-notice {
@include flash($notice-color);
}
.flash-success {
@include flash($success-color);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment