diff --git a/_src/_assets/scss/_alerts.scss b/_src/_assets/scss/_alerts.scss new file mode 100644 index 0000000..cffb3e1 --- /dev/null +++ b/_src/_assets/scss/_alerts.scss @@ -0,0 +1,44 @@ +// +// Alerts +// --- +// ipdb.io +// + +.alert { + font-size: $font-size-small; + padding: $spacer; + margin-bottom: $spacer; + border-radius: $border-radius; + text-align: left; + + // Improve alignment and spacing of inner content + > p + p { + margin-top: 5px; + } + + > p:last-child { margin-bottom: 0; } + + &.hide { + display: none; + } +} + +// Alerts +@mixin alert-variant($background, $text-color) { + background-color: $background; + color: $text-color; + + .alert__link { color: darken($text-color, 10%); } +} + +.alert--success { + @include alert-variant($brand-success, darken($brand-success, 40%)); +} + +.alert--info { + @include alert-variant($brand-05, $text-color); +} + +.alert--danger { + @include alert-variant($brand-failure, darken($brand-failure, 40%)); +} diff --git a/_src/_assets/scss/ipdb.scss b/_src/_assets/scss/ipdb.scss index f1e1172..fd54979 100644 --- a/_src/_assets/scss/ipdb.scss +++ b/_src/_assets/scss/ipdb.scss @@ -16,6 +16,7 @@ @import 'logo'; @import 'caretakers'; @import 'board'; +@import 'alerts'; @import 'cookiebanner'; .content--page--markdown { diff --git a/_src/styleguide.md b/_src/styleguide.md index ca8ca3c..440233d 100644 --- a/_src/styleguide.md +++ b/_src/styleguide.md @@ -145,6 +145,29 @@ All `form__control` elements require an empty placeholder to make browser valida +## Alerts + +
+

+ Great to hear from you! + We’ll get in touch soon. +

+
+ +
+

+ Great to hear from you! + We’ll get in touch soon. +

+
+ +
+

+ Oops, there was an error + Would you mind trying again? +

+
+ ## Section header