Skip to content

Commit ac43187

Browse files
committed
Screenshot container using the same brightness change as the links.
1 parent 1b9b75b commit ac43187

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
@@ -124,17 +124,7 @@ a {
124124
text-decoration: underline;
125125
}
126126

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

140130
main {

pkg/web_css/lib/src/_list.scss

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,8 @@
236236
min-width: 102px;
237237
margin-top: 10px;
238238
cursor: pointer;
239-
}
240-
241-
.packages-screenshot-thumbnail {
242-
transition: 200ms filter;
243-
}
244239

245-
.packages-screenshot-thumbnail:hover {
246-
filter: brightness(50%);
240+
@include variables.brightness-on-hover;
247241
}
248242

249243
.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)