Skip to content

Commit 50b5925

Browse files
committed
improve accent button dropdown styling and layout
1 parent ed17844 commit 50b5925

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

src/components/Navigation/AccentButton.astro

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@
6565
border-radius: 100px;
6666

6767
#accent-options {
68-
right: 10px;
69-
border-radius: 1rem;
68+
right: 0.9rem;
69+
border-radius: 1.1rem;
7070
margin: 0.5rem 0rem;
71-
padding: 1rem;
72-
background-color: oklch(from var(--accent-color) 0.95 0.03 h / 90%);
71+
padding: 0.5rem;
72+
background-color: oklch(from var(--accent-color) 0.98 0.03 h / 90%);
7373
box-shadow:
7474
0 0.3rem 0.3rem rgba(0, 0, 0, 0.1),
7575
0 0 1rem rgba(0, 0, 0, 0.05),
@@ -88,16 +88,12 @@
8888
z-index: 2;
8989

9090
backdrop-filter: blur(2px);
91-
font-size: 0.8rem;
91+
font-size: 1rem;
9292

9393
display: flex;
9494
flex-direction: column;
9595

96-
gap: 0.5rem;
97-
98-
> div {
99-
padding: 0.25rem 1.25rem;
100-
}
96+
gap: 0.2rem;
10197
}
10298

10399
#accent-options.hide {
@@ -136,19 +132,19 @@
136132
}
137133
}
138134
#accent-options div {
139-
padding: 0.4rem 0.6rem;
135+
padding: 0.3rem 0.9rem;
140136
cursor: pointer;
141-
border-radius: 100px;
137+
border-radius: 0.6rem;
142138
}
143139

144140
#accent-options div:hover {
145-
background-color: oklch(0 0 0 / 0.07);
141+
background-color: oklch(0 0 0 / 0.08);
146142
@media (prefers-color-scheme: dark) {
147143
background-color: oklch(1 0 0 / 0.06);
148144
}
149145
}
150146
#accent-options div.selected {
151-
background-color: oklch(0 0 0 / 0.05);
147+
background-color: oklch(0 0 0 / 0.04);
152148
color: var(--accent-color);
153149
@media (prefers-color-scheme: dark) {
154150
background-color: oklch(1 0 0 / 0.04);
@@ -170,8 +166,8 @@
170166

171167
<div id="accent-options" class="options hide">
172168
<div data-value="system" style="color: oklch(from AccentColor 0.7 0.1 h">
173-
System
169+
system
174170
</div>
175-
<div data-value="default" style="color: oklch(0.7 0.1 300)">Default</div>
171+
<div data-value="default" style="color: oklch(0.7 0.1 300)">default</div>
176172
</div>
177173
</div>

0 commit comments

Comments
 (0)