Skip to content

Commit cf6b069

Browse files
committed
Theme fix 2
1 parent 0b38604 commit cf6b069

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

docs/theme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ Rows within panels are separated by a featherlight border. Override the opacity
119119

120120
### §6e — Icon buttons (`.icon-btn`)
121121

122-
Inactive icons use `--bs-secondary-color`; active/hover state transitions to `--bs-primary`. The 0.15 s ease avoids jarring state snaps.
122+
Inactive icons use `--bs-secondary-color`; the **active panel** (`[aria-pressed="true"]`) and hover state both transition to `--bs-primary`. The 0.15 s ease avoids jarring state snaps.
123+
124+
> **Important:** The `[aria-pressed="true"]` active rule **must** live in §6e (the visual overrides section). Do not rely on §6g for this — §6g is structural-only and may be overridden. Custom themes that omit `&[aria-pressed="true"]` from §6e will have no visible active panel indicator.
123125
124126
### §6f — Share URL textarea (`.navigator-share-textarea`)
125127

docs/theme/green.scss

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,13 @@ $font-size-base: 0.9375rem; // 15 px
179179

180180

181181
// §6e Icon buttons
182-
// White icons in the dark top bar; green on hover/active.
182+
// White icons in the dark top bar; green on active/hover.
183183

184184
.icon-btn {
185185
color: var(--bs-secondary-color);
186186
transition: color 0.15s ease;
187187

188+
&[aria-pressed="true"],
188189
&:hover {
189190
color: var(--bs-primary);
190191
}
@@ -193,6 +194,7 @@ $font-size-base: 0.9375rem; // 15 px
193194
[data-bs-theme="dark"] .icon-btn {
194195
color: rgba(255, 255, 255, 0.55);
195196

197+
&[aria-pressed="true"],
196198
&:hover {
197199
color: var(--bs-primary);
198200
}
@@ -287,10 +289,6 @@ $font-size-base: 0.9375rem; // 15 px
287289
position: relative;
288290
padding: 4px 4px 18px;
289291

290-
&[aria-pressed="true"] {
291-
color: var(--bs-primary);
292-
}
293-
294292
&:focus-visible {
295293
outline: 2px solid white;
296294
outline-offset: 2px;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ogis/navigator",
3-
"version": "1.0.17",
3+
"version": "1.0.18",
44
"type": "module",
55
"description": "A map for everyone, right in the browser.",
66
"homepage": "https://www.ogis.org/navigator",

src/assets/sass/theme.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ $font-size-base: 0.9375rem; // 15 px
196196
color: var(--bs-secondary-color);
197197
transition: color 0.15s ease;
198198

199+
&[aria-pressed="true"],
199200
&:hover {
200201
color: var(--bs-primary);
201202
}
@@ -204,6 +205,7 @@ $font-size-base: 0.9375rem; // 15 px
204205
[data-bs-theme="dark"] .icon-btn {
205206
color: rgba(255, 255, 255, 0.50);
206207

208+
&[aria-pressed="true"],
207209
&:hover {
208210
color: var(--bs-primary);
209211
}
@@ -306,10 +308,6 @@ $font-size-base: 0.9375rem; // 15 px
306308
position: relative;
307309
padding: 4px 4px 18px;
308310

309-
&[aria-pressed="true"] {
310-
color: var(--bs-primary);
311-
}
312-
313311
&:focus-visible {
314312
outline: 2px solid white;
315313
outline-offset: 2px;

0 commit comments

Comments
 (0)