-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd82c37
commit fec7bc6
Showing
12 changed files
with
196 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.alert { | ||
@extend %heading-font-regular; | ||
|
||
display: flex; | ||
flex-wrap: nowrap; | ||
justify-content: space-between; | ||
|
||
width: 100%; | ||
padding: $spacer-xs; | ||
|
||
font-size: $font-size-base; | ||
color: $brand-text; | ||
|
||
&--info { | ||
background-color: $brand-primary-light; | ||
} | ||
|
||
&--warn { | ||
background-color: $brand-tertiary-light; | ||
} | ||
|
||
&--error { | ||
background-color: $brand-error; | ||
} | ||
} | ||
|
||
.alert__text { | ||
margin-bottom: 0; | ||
} | ||
|
||
.alert__btn { | ||
@extend %base-button; | ||
|
||
color: inherit; | ||
background-color: transparent; | ||
} | ||
|
||
@include for-tablet-landscape-up { | ||
.alert { | ||
padding: $spacer-sm; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
title: Alert | ||
description: Alert | ||
|
||
```html | ||
<div class="alert alert--info"> | ||
<p class="alert__text"><strong>Erfolg!</strong> Vielen Dank.</p> | ||
<button class="alert__btn" type="button"> | ||
<span class="icon--close"></span> | ||
<span class="sr-only">Schließen</span> | ||
</button> | ||
</div> | ||
|
||
<div class="alert alert--warn"> | ||
<p class="alert__text"><strong>Das hat nicht geklappt!</strong> Bitte füllen Sie alle Felder aus.</p> | ||
<button class="alert__btn" type="button"> | ||
<span class="icon--close"></span> | ||
<span class="sr-only">Schließen</span> | ||
</button> | ||
</div> | ||
|
||
<div class="alert alert--error"> | ||
<p class="alert__text"><strong>Das hat nicht geklappt!</strong> Bitte füllen Sie alle Felder aus.</p> | ||
<button class="alert__btn" type="button"> | ||
<span class="icon--close"></span> | ||
<span class="sr-only">Schließen</span> | ||
</button> | ||
</div> | ||
``` |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,65 @@ | ||
.icon { | ||
&.icon-add { | ||
@include icon-before("icons/add.svg", inherit, 1.5rem); | ||
// Icon helper | ||
@mixin icon-before($svg-path, $color, $height: 1rem) { | ||
&::before { | ||
content: " "; | ||
|
||
display: block; | ||
|
||
width: $height; | ||
height: $height; | ||
|
||
color: $color; | ||
|
||
background-color: currentcolor; | ||
|
||
mask-image: asset-url($svg-path); | ||
mask-position: center; | ||
mask-repeat: no-repeat; | ||
mask-size: contain; | ||
} | ||
} | ||
|
||
.icon--add { | ||
@include icon-before("icons/add.svg", 1.5rem); | ||
} | ||
|
||
.icon--close { | ||
@include icon-before("icons/close.svg", inherit, 1rem); | ||
} | ||
|
||
//Sizes | ||
.icon--small { | ||
width: $spacer-sm; | ||
height: $spacer-sm; | ||
} | ||
|
||
.icon--medium { | ||
width: $spacer-lg; | ||
height: $spacer-lg; | ||
} | ||
|
||
.icon--big { | ||
width: $spacer-xl; | ||
height: $spacer-xl; | ||
} | ||
|
||
// Colors | ||
.icon--brand-primary { | ||
background: $brand-primary; | ||
} | ||
|
||
.icon--brand-secondary { | ||
background: $brand-secondary; | ||
} | ||
|
||
.icon--brand-white { | ||
background: $brand-white; | ||
} | ||
|
||
.icon--brand-black { | ||
background: $brand-black; | ||
} | ||
|
||
.icon-close { | ||
mask-image: asset-url("icons/close.svg"); | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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