From 47a223d2944af224c81a9ac2a1cdd4665baf8ee4 Mon Sep 17 00:00:00 2001
From: Michael Coker <35148959+mcoker@users.noreply.github.com>
Date: Mon, 20 Mar 2023 20:18:48 -0500
Subject: [PATCH] fix(global): rename default status color to custom (#5418)
* fix(global): rename default status color to custom
* chore(text): update default/custom docs
* chore(examples): update example text
* chore(notification-drawer): updated list-item docs
removed explicit state classes, unbolded that part to match alert and button, which say the same thing.
---
src/patternfly/base/_variables.scss | 6 ++---
src/patternfly/components/Alert/alert.scss | 22 +++++++++++++---
.../components/Alert/examples/Alert.md | 26 +++++++++----------
.../components/Alert/themes/dark/alert.scss | 2 +-
.../AlertGroup/examples/AlertGroup.md | 8 +++---
.../components/Icon/examples/Icon.md | 4 +--
src/patternfly/components/Icon/icon.scss | 6 ++---
src/patternfly/components/Label/label.scss | 8 +++---
.../components/Label/themes/dark/label.scss | 4 +--
.../components/ModalBox/examples/ModalBox.md | 10 +++----
.../ModalBox/modal-box-title-icon.hbs | 2 +-
.../components/ModalBox/modal-box-title.hbs | 2 +-
.../components/ModalBox/modal-box.hbs | 2 +-
.../components/ModalBox/modal-box.scss | 6 ++---
.../examples/NotificationDrawer.md | 4 +--
.../notification-drawer-basic-list.hbs | 4 +--
...ification-drawer-list-item-header-icon.hbs | 2 +-
...fication-drawer-list-item-header-title.hbs | 4 +--
.../notification-drawer-list-item.hbs | 4 +--
.../notification-drawer.scss | 10 +++----
.../components/Popover/examples/Popover.md | 12 ++++-----
.../components/Popover/popover-title-text.hbs | 4 +--
.../components/Popover/popover-title.hbs | 2 +-
src/patternfly/components/Popover/popover.hbs | 2 +-
.../components/Popover/popover.scss | 10 +++----
.../Popover/themes/dark/popover.scss | 2 +-
.../sass-utilities/scss-variables.scss | 6 ++---
.../utilities/Text/examples/Text.md | 14 +++++-----
src/patternfly/utilities/Text/text.scss | 12 ++++-----
.../utilities/Text/themes/dark/text.scss | 4 +--
30 files changed, 109 insertions(+), 95 deletions(-)
diff --git a/src/patternfly/base/_variables.scss b/src/patternfly/base/_variables.scss
index 74f601fb35..7b16de5f1c 100644
--- a/src/patternfly/base/_variables.scss
+++ b/src/patternfly/base/_variables.scss
@@ -123,9 +123,9 @@
--pf-global--primary-color--light-100: #{$pf-global--primary-color--light-100};
--pf-global--primary-color--dark-100: #{$pf-global--primary-color--dark-100};
--pf-global--secondary-color--100: #{$pf-global--secondary-color--100};
- --pf-global--default-color--100: #{$pf-global--default-color--100};
- --pf-global--default-color--200: #{$pf-global--default-color--200};
- --pf-global--default-color--300: #{$pf-global--default-color--300};
+ --pf-global--custom-color--100: #{$pf-global--custom-color--100};
+ --pf-global--custom-color--200: #{$pf-global--custom-color--200};
+ --pf-global--custom-color--300: #{$pf-global--custom-color--300};
--pf-global--success-color--100: #{$pf-global--success-color--100};
--pf-global--success-color--200: #{$pf-global--success-color--200};
--pf-global--info-color--100: #{$pf-global--info-color--100};
diff --git a/src/patternfly/components/Alert/alert.scss b/src/patternfly/components/Alert/alert.scss
index 25d9805438..1ee86faa21 100644
--- a/src/patternfly/components/Alert/alert.scss
+++ b/src/patternfly/components/Alert/alert.scss
@@ -8,7 +8,7 @@
". description description"
". actiongroup actiongroup";
--pf-c-alert--BorderTopWidth: var(--pf-global--BorderWidth--md);
- --pf-c-alert--BorderTopColor: var(--pf-global--default-color--200);
+ --pf-c-alert--BorderTopColor: var(--pf-global--BorderColor--100);
--pf-c-alert--PaddingTop: var(--pf-global--spacer--md);
--pf-c-alert--PaddingRight: var(--pf-global--spacer--md);
--pf-c-alert--PaddingBottom: var(--pf-global--spacer--md);
@@ -25,14 +25,14 @@
--pf-c-alert__toggle-icon--Transition: var(--pf-global--Transition);
// Icon
- --pf-c-alert__icon--Color: var(--pf-global--default-color--200);
+ --pf-c-alert__icon--Color: var(--pf-global--Color--100);
--pf-c-alert__icon--MarginTop: #{pf-size-prem(1px)};
--pf-c-alert__icon--MarginRight: var(--pf-global--spacer--sm);
--pf-c-alert__icon--FontSize: var(--pf-global--icon--FontSize--md);
// Title
--pf-c-alert__title--FontWeight: var(--pf-global--FontWeight--bold);
- --pf-c-alert__title--Color: var(--pf-global--default-color--300);
+ --pf-c-alert__title--Color: var(--pf-global--Color--100);
--pf-c-alert__title--max-lines: 1;
// Action
@@ -51,6 +51,11 @@
--pf-c-alert__description--action-group--PaddingTop: var(--pf-c-alert__description--action-group--PaddingTop-base);
--pf-c-alert__action-group__c-button--not-last-child--MarginRight: var(--pf-global--spacer--lg);
+ // Custom
+ --pf-c-alert--m-custom--BorderTopColor: var(--pf-global--custom-color--200);
+ --pf-c-alert--m-custom__icon--Color: var(--pf-global--custom-color--200);
+ --pf-c-alert--m-custom__title--Color: var(--pf-global--custom-color--300);
+
// Success
--pf-c-alert--m-success--BorderTopColor: var(--pf-global--success-color--100);
--pf-c-alert--m-success__icon--Color: var(--pf-global--success-color--100);
@@ -73,7 +78,9 @@
// Inline
--pf-c-alert--m-inline--BoxShadow: none;
- --pf-c-alert--m-inline--BackgroundColor: var(--pf-global--palette--cyan-50);
+
+ // Inline custom
+ --pf-c-alert--m-inline--m-custom--BackgroundColor: var(--pf-global--palette--cyan-50);
// Inline success
--pf-c-alert--m-inline--m-success--BackgroundColor: var(--pf-global--palette--green-50);
@@ -119,6 +126,13 @@
border-top: var(--pf-c-alert--BorderTopWidth) solid var(--pf-c-alert--BorderTopColor);
box-shadow: var(--pf-c-alert--BoxShadow);
+ &.pf-m-custom {
+ --pf-c-alert--BorderTopColor: var(--pf-c-alert--m-custom--BorderTopColor);
+ --pf-c-alert__icon--Color: var(--pf-c-alert--m-custom__icon--Color);
+ --pf-c-alert__title--Color: var(--pf-c-alert--m-custom__title--Color);
+ --pf-c-alert--m-inline--BackgroundColor: var(--pf-c-alert--m-inline--m-custom--BackgroundColor);
+ }
+
&.pf-m-success {
--pf-c-alert--BorderTopColor: var(--pf-c-alert--m-success--BorderTopColor);
--pf-c-alert__icon--Color: var(--pf-c-alert--m-success__icon--Color);
diff --git a/src/patternfly/components/Alert/examples/Alert.md b/src/patternfly/components/Alert/examples/Alert.md
index a937dae28f..82f1203d12 100644
--- a/src/patternfly/components/Alert/examples/Alert.md
+++ b/src/patternfly/components/Alert/examples/Alert.md
@@ -7,11 +7,11 @@ cssPrefix: pf-c-alert
## Examples
### Types
```hbs
-{{#> alert alert--attribute='aria-label="Default alert"'}}
+{{#> alert alert--modifier="pf-m-custom" alert--attribute='aria-label="Custom alert"'}}
{{> alert-icon alert-icon--type="bell"}}
{{#> alert-title}}
- {{#> screen-reader}}Default alert:{{/screen-reader}}
- Default alert title
+ {{#> screen-reader}}Custom alert:{{/screen-reader}}
+ Custom alert title
{{/alert-title}}
{{/alert}}
@@ -157,11 +157,11 @@ cssPrefix: pf-c-alert
### Inline types
```hbs
-{{#> alert alert--modifier="pf-m-inline" alert--attribute='aria-label="Inline default alert"'}}
+{{#> alert alert--modifier="pf-m-custom pf-m-inline" alert--attribute='aria-label="Inline custom alert"'}}
{{> alert-icon alert-icon--type="bell"}}
{{#> alert-title}}
- {{#> screen-reader}}Default inline alert:{{/screen-reader}}
- Default inline alert title
+ {{#> screen-reader}}Custom inline alert:{{/screen-reader}}
+ Custom inline alert title
{{/alert-title}}
{{/alert}}
@@ -404,13 +404,10 @@ cssPrefix: pf-c-alert
```
## Documentation
-### Overview
-Add a modifier class to the default alert to change the color: `.pf-m-success`, `.pf-m-danger`, `.pf-m-warning`, or `.pf-m-info`.
-
### Usage
| Class | Applied to | Outcome |
| -- | -- | -- |
-| `.pf-c-alert` | `