Skip to content

Commit

Permalink
Update shadow utils (#2581)
Browse files Browse the repository at this point in the history
* remove large/xlarge shadows

* Create dry-schools-clap.md
  • Loading branch information
langermank authored Mar 14, 2024
1 parent 5e2a920 commit 5d8a030
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-schools-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Update shadow utils
4 changes: 2 additions & 2 deletions src/select-menu/select-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ $SelectMenu-max-height: 480px !default;
border: $border-width $border-style var(--selectMenu-borderColor, var(--color-select-menu-backdrop-border));
// stylelint-disable-next-line primer/borders
border-radius: $border-radius * 2;
box-shadow: var(--shadow-floating-large, var(--color-shadow-large));
box-shadow: var(--shadow-floating-small, var(--color-overlay-shadow));
animation: SelectMenu-modal-animation 0.12s cubic-bezier(0, 0.1, 0.1, 1) backwards;

@keyframes SelectMenu-modal-animation {
Expand All @@ -90,7 +90,7 @@ $SelectMenu-max-height: 480px !default;
font-size: $font-size-small;
border-color: var(--borderColor-default, var(--color-border-default));
border-radius: $border-radius;
box-shadow: var(--shadow-floating-large, var(--color-shadow-large));
box-shadow: var(--shadow-floating-small, var(--color-overlay-shadow));
animation-name: SelectMenu-modal-animation--sm;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/toasts/toasts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
color: var(--fgColor-default, var(--color-fg-default));
background-color: var(--bgColor-default, var(--color-canvas-default));
border-radius: $border-radius;
box-shadow: inset 0 0 0 1px var(--borderColor-default, var(--color-border-default)), var(--shadow-floating-large, var(--color-shadow-large));
box-shadow: inset 0 0 0 1px var(--borderColor-default, var(--color-border-default)), var(--shadow-floating-small, var(--color-overlay-shadow));

@include breakpoint(sm) {
width: max-content;
Expand Down Expand Up @@ -53,7 +53,7 @@

.Toast--loading {
color: var(--fgColor-default, var(--color-fg-default));
box-shadow: inset 0 0 0 1px var(--borderColor-default, var(--color-border-default)), var(--shadow-floating-large, var(--color-shadow-large));
box-shadow: inset 0 0 0 1px var(--borderColor-default, var(--color-border-default)), var(--shadow-floating-small, var(--color-overlay-shadow));

.Toast-icon {
background-color: var(--bgColor-neutral-emphasis, var(--color-neutral-emphasis));
Expand All @@ -62,7 +62,7 @@

.Toast--error {
color: var(--fgColor-default, var(--color-fg-default));
box-shadow: inset 0 0 0 1px var(--borderColor-default, var(--color-border-default)), var(--shadow-floating-large, var(--color-shadow-large));
box-shadow: inset 0 0 0 1px var(--borderColor-default, var(--color-border-default)), var(--shadow-floating-small, var(--color-overlay-shadow));

.Toast-icon {
background-color: var(--bgColor-danger-emphasis, var(--color-danger-emphasis));
Expand All @@ -71,7 +71,7 @@

.Toast--warning {
color: var(--fgColor-default, var(--color-fg-default));
box-shadow: inset 0 0 0 1px var(--borderColor-default, var(--color-border-default)), var(--shadow-floating-large, var(--color-shadow-large));
box-shadow: inset 0 0 0 1px var(--borderColor-default, var(--color-border-default)), var(--shadow-floating-small, var(--color-overlay-shadow));

.Toast-icon {
background-color: var(--bgColor-attention-emphasis, var(--color-attention-emphasis));
Expand All @@ -80,7 +80,7 @@

.Toast--success {
color: var(--fgColor-default, var(--color-fg-default));
box-shadow: inset 0 0 0 1px var(--borderColor-default, var(--color-border-default)), var(--shadow-floating-large, var(--color-shadow-large));
box-shadow: inset 0 0 0 1px var(--borderColor-default, var(--color-border-default)), var(--shadow-floating-small, var(--color-overlay-shadow));

.Toast-icon {
background-color: var(--bgColor-success-emphasis, var(--color-success-emphasis));
Expand Down
4 changes: 4 additions & 0 deletions src/utilities/box-shadow.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
box-shadow: var(--shadow-floating-xlarge, var(--color-shadow-extra-large)) !important;
}

.shadow-floating-small {
box-shadow: var(--shadow-floating-small, var(--color-overlay-shadow)) !important;
}

// Turn off box shadow

.box-shadow-none {
Expand Down

0 comments on commit 5d8a030

Please sign in to comment.