1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
.wallpaper-list {
display: grid;
gap: 16px;
grid-template-columns: 1fr 1fr 1fr;
grid-auto-rows: 86px;
margin: 16px 0;
padding: 0;
border: none;
.wallpaper-input,
.sr-only {
&.theme-light {
display: inline-block;
@include dark-theme-only {
display: none;
}
}
&.theme-dark {
display: none;
@include dark-theme-only {
display: inline-block;
}
}
}
.wallpaper-input {
appearance: none;
margin: 0;
padding: 0;
height: 86px;
width: 100%;
box-shadow: $shadow-secondary;
border-radius: 8px;
background-clip: content-box;
background-repeat: no-repeat;
background-size: cover;
cursor: pointer;
outline: 2px solid transparent;
$wallpapers: dark-landscape, dark-color, dark-mountain, dark-panda, dark-sky, dark-beach, light-beach, light-color, light-landscape, light-mountain, light-panda, light-sky;
@each $wallpaper in $wallpapers {
&.#{$wallpaper} {
background-image: url('chrome://activity-stream/content/data/content/assets/wallpapers/#{$wallpaper}.avif')
}
}
&:checked {
outline-color: var(--color-accent-primary-active);
}
&:focus-visible {
outline-color: var(--newtab-primary-action-background);
}
&:hover {
filter: brightness(55%);
outline-color: transparent;
}
}
// visually hide label, but still read by screen readers
.sr-only {
opacity: 0;
overflow: hidden;
position: absolute;
pointer-events: none;
}
}
.wallpapers-reset {
background: none;
border: none;
text-decoration: underline;
margin-inline: auto;
display: block;
font-size: var(--font-size-small);
color: var(--newtab-text-primary-color);
cursor: pointer;
&:hover {
text-decoration: none;
}
}
|