Skip to content

Commit

Permalink
fix(alert): app level action buttons hover and active colors (#1495)
Browse files Browse the repository at this point in the history
## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] If applicable, have a visual design approval

## PR Type

What kind of change does this PR introduce?

- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:

## What is the current behavior?
States `:hover` and `:click` background and text colors are wrong.
Regression is added with #1445

Issue Number: CDE-2211

## What is the new behavior?
App level action button states `:hover` and `:click` background and text
colors are using respective outline button colors.

## Does this PR introduce a breaking change?

- [ ] Yes
- [x] No

## Other information
  • Loading branch information
valentin-mladenov authored Jul 27, 2024
1 parent 6c4b36e commit 5eb061e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
22 changes: 21 additions & 1 deletion projects/angular/src/emphasis/alert/_alert.clarity.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2024 Broadcom. All Rights Reserved.
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this project.
*/
Expand Down Expand Up @@ -306,22 +306,42 @@

&.alert-info {
@include generateAlertType(app-info);

.alert-item .btn {
@extend .btn-info-outline;
}
}

&.alert-danger {
@include generateAlertType(app-danger);

.alert-item .btn {
@extend .btn-danger-outline;
}
}

&.alert-neutral {
@include generateAlertType(app-neutral);

.alert-item .btn {
@extend .btn-neutral-outline;
}
}

&.alert-warning {
@include generateAlertType(app-warning);

.alert-item .btn {
@extend .btn-warning-outline;
}
}

&.alert-success {
@include generateAlertType(app-success);

.alert-item .btn {
@extend .btn-success-outline;
}
}

.alert-items {
Expand Down
10 changes: 5 additions & 5 deletions projects/angular/src/emphasis/alert/_variables.alert.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2024 Broadcom. All Rights Reserved.
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this project.
*/
Expand Down Expand Up @@ -517,10 +517,10 @@ $clr-app-alert-neutral: (
icon-color: var(--clr-app-alert-neutral-icon-color),
color: var(--clr-app-alert-neutral-font-color),
border-color: var(--clr-app-alert-neutral-border-color),
close-icon-color: var(--clr-app-alert-neutral-close-icon-color),
action-color: var(--clr-app-alert-neutral-action-color),
action-active-color: var(--clr-app-alert-neutral-action-active-color),
close-icon-hover-color: var(--clr-app-alert-neutral-close-icon-hover-color),
close-icon: var(--clr-app-alert-neutral-close-icon-color),
action: var(--clr-app-alert-neutral-action-color),
action-active: var(--clr-app-alert-neutral-action-active-color),
close-icon-hover: var(--clr-app-alert-neutral-close-icon-hover-color),
) !default;

@function lookupAppNeutralAlertColor($property: color) {
Expand Down

0 comments on commit 5eb061e

Please sign in to comment.