Skip to content

Commit

Permalink
optimize alert on small screens and add margin
Browse files Browse the repository at this point in the history
  • Loading branch information
rstrangh committed Feb 21, 2018
1 parent 4fc68ce commit a935a4a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
14 changes: 12 additions & 2 deletions components/02-molecules/alert/_alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ $alert-color: $brand-white;
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
padding: $container-spacer-y-sm $container-spacer-x-sm;
margin-bottom: $content-spacer-sm;
padding: $spacer-xs;
line-height: $alert-line-height;
color: $alert-color;
font-size: $alert-font-size;
font-size: $alert-font-size-sm;

&--info {
background-color: $brand-info;
Expand All @@ -28,3 +29,12 @@ $alert-color: $brand-white;
@extend %base-button;
color: inherit;
}


@media screen and (min-width: $grid-breakpoint-md) {
.alert {
margin-bottom: $content-spacer-base;
padding: $container-spacer-y-sm $container-spacer-x-sm;
font-size: $alert-font-size;
}
}
14 changes: 8 additions & 6 deletions components/02-molecules/alert/alert.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<div class="alert alert--info">
<div class="alert-text"><strong>Vorsicht!</strong> Vielen Dank.</div>
<button class="alert-btn" type="button">
<i class="icon icon-close"></i>
<span class="sr-only">Schließen</span>
</button>
<div>
<div class="alert alert--info">
<div class="alert-text"><strong>Vorsicht!</strong> Vielen Dank.</div>
<button class="alert-btn" type="button">
<i class="icon icon-close"></i>
<span class="sr-only">Schließen</span>
</button>
</div>
</div>
1 change: 1 addition & 0 deletions lib/styles/settings/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -520,3 +520,4 @@ $paginator-font-size: ms(3);
// Alert
$alert-font-size: $companion-font-size; // 21px
$alert-line-height: $base-line-height; // 25px
$alert-font-size-sm: $base-font-size; // 16px

0 comments on commit a935a4a

Please sign in to comment.