Skip to content

Commit

Permalink
Replace drop-shadow with only borders in dark mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos committed Jan 23, 2025
1 parent ac0d446 commit 891f2d0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/web_css/lib/src/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@
}

.mini-list-item {
@include variables.elevated-content-border;

background: var(--pub-neutral-bgColor);
border-radius: 4px;
box-shadow: 0px 2px 7px 0px var(--pub-home_card-box_shadow-color);
padding: 28px 30px 30px; // title's top gap is about 2px (30-2 => 28)
margin-bottom: 10px;
min-height: 100px;

&:hover {
background: var(--pub-neutral-hover-bgColor);
box-shadow: 0px 4px 9px 0px var(--pub-home_card_hover-box_shadow-color);

@media (min-width: variables.$device-desktop-min-width) {
.mini-list-item-body {
Expand Down
18 changes: 18 additions & 0 deletions pkg/web_css/lib/src/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,24 @@
}
}

@mixin elevated-content-border {
.light-theme & {
box-shadow: 0px 2px 7px 0px var(--pub-home_card-box_shadow-color);

&:hover {
box-shadow: 0px 4px 9px 0px var(--pub-home_card_hover-box_shadow-color);
}
}

.dark-theme & {
border: 1px solid var(--pub-home_card-box_shadow-color);

&:hover {
border-color: var(--pub-home_card_hover-box_shadow-color);
}
}
}

$device-desktop-min-width: 641px;
$device-mobile-max-width: 640px;
$device-tablet-max-width: 979px;
Expand Down

0 comments on commit 891f2d0

Please sign in to comment.