Skip to content

Commit fd5eda7

Browse files
authored
Replace drop-shadow with only borders in dark mode. (#8489)
1 parent ac0d446 commit fd5eda7

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

pkg/web_css/lib/src/_home.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@
106106
}
107107

108108
.mini-list-item {
109+
@include variables.elevated-content-border;
110+
109111
background: var(--pub-neutral-bgColor);
110112
border-radius: 4px;
111-
box-shadow: 0px 2px 7px 0px var(--pub-home_card-box_shadow-color);
112113
padding: 28px 30px 30px; // title's top gap is about 2px (30-2 => 28)
113114
margin-bottom: 10px;
114115
min-height: 100px;
115116

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

120120
@media (min-width: variables.$device-desktop-min-width) {
121121
.mini-list-item-body {

pkg/web_css/lib/src/_variables.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,24 @@
244244
}
245245
}
246246

247+
@mixin elevated-content-border {
248+
.light-theme & {
249+
box-shadow: 0px 2px 7px 0px var(--pub-home_card-box_shadow-color);
250+
251+
&:hover {
252+
box-shadow: 0px 4px 9px 0px var(--pub-home_card_hover-box_shadow-color);
253+
}
254+
}
255+
256+
.dark-theme & {
257+
border: 1px solid var(--pub-home_card-box_shadow-color);
258+
259+
&:hover {
260+
border-color: var(--pub-home_card_hover-box_shadow-color);
261+
}
262+
}
263+
}
264+
247265
$device-desktop-min-width: 641px;
248266
$device-mobile-max-width: 640px;
249267
$device-tablet-max-width: 979px;

0 commit comments

Comments
 (0)