From 45acf5572e84df78b9e7fb1ee44c4351384360f3 Mon Sep 17 00:00:00 2001 From: Cameron Dutro Date: Thu, 27 Oct 2022 14:29:41 -0700 Subject: [PATCH 1/3] Don't apply flash* classes to banners --- src/alerts/flash.scss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/alerts/flash.scss b/src/alerts/flash.scss index 8b635f4ff1..3eb04bde14 100644 --- a/src/alerts/flash.scss +++ b/src/alerts/flash.scss @@ -1,7 +1,7 @@ // stylelint-disable selector-max-type, no-duplicate-selectors // Default flash -.flash { +.flash:not(.Banner) { position: relative; // stylelint-disable-next-line primer/spacing padding: 20px $spacer-3; @@ -76,7 +76,7 @@ // Color variations // -.flash { +.flash:not(.Banner) { color: var(--color-fg-default); background-image: linear-gradient(var(--color-accent-subtle), var(--color-accent-subtle)); border-color: var(--color-accent-muted); @@ -86,7 +86,7 @@ } } -.flash-warn { +.flash-warn:not(.Banner--warning) { color: var(--color-fg-default); background-image: linear-gradient(var(--color-attention-subtle), var(--color-attention-subtle)); border-color: var(--color-attention-muted); @@ -96,7 +96,7 @@ } } -.flash-error { +.flash-error:not(.Banner--error) { color: var(--color-fg-default); background-image: linear-gradient(var(--color-danger-subtle), var(--color-danger-subtle)); border-color: var(--color-danger-muted); @@ -106,7 +106,7 @@ } } -.flash-success { +.flash-success:not(.Banner--success) { color: var(--color-fg-default); background-image: linear-gradient(var(--color-success-subtle), var(--color-success-subtle)); border-color: var(--color-success-muted); @@ -120,7 +120,7 @@ // Layout variations // -.flash-full { +.flash-full:not(.Banner--full) { // stylelint-disable-next-line primer/spacing margin-top: -1px; border-width: $border-width 0; From ecbe040ec18bc747542780c9a51a524d65bf49a5 Mon Sep 17 00:00:00 2001 From: Cameron Dutro Date: Thu, 27 Oct 2022 14:33:34 -0700 Subject: [PATCH 2/3] Add a changeset --- .changeset/dirty-lemons-flash.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/dirty-lemons-flash.md diff --git a/.changeset/dirty-lemons-flash.md b/.changeset/dirty-lemons-flash.md new file mode 100644 index 0000000000..678b3cba6b --- /dev/null +++ b/.changeset/dirty-lemons-flash.md @@ -0,0 +1,5 @@ +--- +"@primer/css": minor +--- + +Don't apply flash\* classes to banners From 6034d2e1053c8c6babee208877419485096e2e63 Mon Sep 17 00:00:00 2001 From: Cameron Dutro Date: Thu, 27 Oct 2022 14:59:47 -0700 Subject: [PATCH 3/3] Just use :not(.Banner) --- src/alerts/flash.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/alerts/flash.scss b/src/alerts/flash.scss index 3eb04bde14..e9a1dbdff0 100644 --- a/src/alerts/flash.scss +++ b/src/alerts/flash.scss @@ -86,7 +86,7 @@ } } -.flash-warn:not(.Banner--warning) { +.flash-warn:not(.Banner) { color: var(--color-fg-default); background-image: linear-gradient(var(--color-attention-subtle), var(--color-attention-subtle)); border-color: var(--color-attention-muted); @@ -96,7 +96,7 @@ } } -.flash-error:not(.Banner--error) { +.flash-error:not(.Banner) { color: var(--color-fg-default); background-image: linear-gradient(var(--color-danger-subtle), var(--color-danger-subtle)); border-color: var(--color-danger-muted); @@ -106,7 +106,7 @@ } } -.flash-success:not(.Banner--success) { +.flash-success:not(.Banner) { color: var(--color-fg-default); background-image: linear-gradient(var(--color-success-subtle), var(--color-success-subtle)); border-color: var(--color-success-muted); @@ -120,7 +120,7 @@ // Layout variations // -.flash-full:not(.Banner--full) { +.flash-full:not(.Banner) { // stylelint-disable-next-line primer/spacing margin-top: -1px; border-width: $border-width 0;