Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: alert follows fiori3 #470

Merged
merged 4 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $block: #{$fd-namespace}-alert;
.#{$block} {
$fd-alert-border: 1px solid;
$fd-alert-border-radius: 0.25rem;
$fd-alert-padding: 0.5rem 1rem;
$fd-alert-padding: 0.375rem 1rem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the top and bottom padding should be 0.4375rem. In specs they say 0.5rem (including border)

$fd-alert-padding-default: 1rem;
$fd-alert-padding-dismissible: 2.5rem;
$fd-alert-padding-status: 2.5rem;
Expand All @@ -21,16 +21,19 @@ $block: #{$fd-namespace}-alert;
@mixin fd-alert-icon-container {
position: absolute;
width: 2.5rem;
top: 0.625rem;
top: 0.375rem;
left: 0;
}

@mixin fd-alert-close-btn-container {
position: absolute;
width: 2rem;
height: 1.625rem;
top: 0.375rem;
top: 0.125rem;
right: 0.125rem;
display: flex;
align-items: center;
justify-content: center;
min-width: 2rem;
height: 1.625rem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interaction states of the button should follow these of the Transparent button

}

// SUCCESS
Expand Down Expand Up @@ -58,14 +61,14 @@ $block: #{$fd-namespace}-alert;
// Block
@include fd-reset();

font-size: var(--sapFontSize);
position: relative;
color: $fd-alert-text-color;
background-color: $fd-alert-background-color;
border: $fd-alert-border;
border-color: $fd-alert-border-color;
border-radius: $fd-alert-border-radius;
padding: $fd-alert-padding;
min-height: 2.5rem;
display: flex;
align-items: center;

Expand All @@ -79,9 +82,9 @@ $block: #{$fd-namespace}-alert;

// Elements
&__close {
@include fd-button-reset();
@include fd-alert-close-btn-container();
@include fd-icon("decline", "m");
@include fd-button-reset();
@include fd-focus();

@include fd-rtl() {
Expand Down Expand Up @@ -222,5 +225,7 @@ $block: #{$fd-namespace}-alert;

&__text {
@include fd-reset();

line-height: 1rem;
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.