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(notification): update focus styles for low contrast #5978

Merged
merged 9 commits into from
May 12, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -190,30 +190,43 @@
}

.#{$prefix}--inline-notification__action-button.#{$prefix}--btn--ghost {
color: $inverse-link;
height: rem(32px);
margin-bottom: $carbon--spacing-03;
margin-left: $carbon--spacing-08;

@include carbon--breakpoint(md) {
margin: $carbon--spacing-03 0;
}
}

&,
&:hover,
&:focus,
&:active {
color: $inverse-link;
}
.#{$prefix}--inline-notification--low-contrast
.#{$prefix}--inline-notification__action-button.#{$prefix}--btn--ghost {
color: $link-01;
}

&:focus {
border-color: transparent;
outline: 2px solid $inverse-focus-ui;
outline-offset: -2px;
}
.#{$prefix}--inline-notification__action-button.#{$prefix}--btn--ghost:active,
.#{$prefix}--inline-notification__action-button.#{$prefix}--btn--ghost:hover {
background-color: $inverse-hover-ui;
}

&:hover {
background-color: $inverse-hover-ui;
}
.#{$prefix}--inline-notification--low-contrast
.#{$prefix}--inline-notification__action-button.#{$prefix}--btn--ghost:active,
.#{$prefix}--inline-notification--low-contrast
.#{$prefix}--inline-notification__action-button.#{$prefix}--btn--ghost:hover {
background-color: $carbon--white-0;
}

.#{$prefix}--inline-notification__action-button.#{$prefix}--btn--ghost:focus {
border-color: transparent;
box-shadow: none;
outline: 2px solid $inverse-focus-ui;
outline-offset: -2px;
}

.#{$prefix}--inline-notification--low-contrast
.#{$prefix}--inline-notification__action-button.#{$prefix}--btn--ghost:focus {
outline-color: $focus;
}

.#{$prefix}--inline-notification--hide-close-button
Expand Down Expand Up @@ -256,7 +269,7 @@
}

.#{$prefix}--inline-notification--low-contrast
.#{$prefix}--inline-notification__close-button {
.#{$prefix}--inline-notification__close-button:focus {
@include focus-outline('outline');
}

Expand All @@ -267,10 +280,10 @@
}

.#{$prefix}--inline-notification__action-button {
color: $carbon--blue-60;
color: $interactive-01;

&:active {
color: $carbon--blue-80;
color: $interactive-01;
}

&:active,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
}

.#{$prefix}--toast-notification--low-contrast
.#{$prefix}--toast-notification__close-button {
.#{$prefix}--toast-notification__close-button:focus {
@include focus-outline('outline');
}

Expand Down