Skip to content

Commit 662dabe

Browse files
authored
Screenshot container using the same brightness change as the links. (#8555)
1 parent 86dcd84 commit 662dabe

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

pkg/web_css/lib/src/_base.scss

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,7 @@ a {
125125
text-decoration: underline;
126126
}
127127

128-
.light-theme & {
129-
&:hover {
130-
filter: brightness(80%);
131-
}
132-
}
133-
134-
.dark-theme & {
135-
&:hover {
136-
filter: brightness(120%);
137-
}
138-
}
128+
@include variables.brightness-on-hover;
139129
}
140130

141131
main {

pkg/web_css/lib/src/_list.scss

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,8 @@
228228
min-width: 102px;
229229
margin-top: 10px;
230230
cursor: pointer;
231-
}
232-
233-
.packages-screenshot-thumbnail {
234-
transition: 200ms filter;
235-
}
236231

237-
.packages-screenshot-thumbnail:hover {
238-
filter: brightness(50%);
232+
@include variables.brightness-on-hover;
239233
}
240234

241235
.packages-title {

pkg/web_css/lib/src/_variables.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,22 @@
281281
}
282282
}
283283

284+
@mixin brightness-on-hover {
285+
transition: 0.3s filter;
286+
287+
.light-theme & {
288+
&:hover {
289+
filter: brightness(80%);
290+
}
291+
}
292+
293+
.dark-theme & {
294+
&:hover {
295+
filter: brightness(120%);
296+
}
297+
}
298+
}
299+
284300
$device-desktop-min-width: 641px;
285301
$device-mobile-max-width: 640px;
286302
$device-tablet-max-width: 979px;

0 commit comments

Comments
 (0)