fix: clarify compass orientation state

This commit is contained in:
2026-07-23 02:29:12 +01:00
parent 1d4d09ff5e
commit 623838c861
+28 -2
View File
@@ -518,14 +518,40 @@ button:disabled {
} }
.map-wrap .ol-device-compass button:hover, .map-wrap .ol-device-compass button:hover,
.map-wrap .ol-device-compass button:focus, .map-wrap .ol-device-compass button:focus {
.map-wrap .ol-device-compass button[aria-pressed="true"] {
background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%); background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
color: #fff; color: #fff;
outline: 2px solid rgba(31, 122, 98, 0.35); outline: 2px solid rgba(31, 122, 98, 0.35);
outline-offset: -2px; outline-offset: -2px;
} }
/* Compass orientation stays visibly engaged after the pointer leaves the
control. The inset high-contrast ring and explicit label do not rely on
the green active colour alone. */
.map-wrap .ol-device-compass button[aria-pressed="true"] {
position: relative;
border: 3px solid #fffefb;
background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
color: #fff;
outline: 2px solid #1f2a2e;
outline-offset: -5px;
}
.map-wrap .ol-device-compass button[aria-pressed="true"]::after {
position: absolute;
top: 2px;
right: 2px;
padding: 1px 2px;
border-radius: 3px;
background: #fffefb;
color: #1f2a2e;
content: "ON";
font-size: 0.45rem;
font-weight: 800;
letter-spacing: 0.02em;
line-height: 1;
}
.device-compass-icon { .device-compass-icon {
display: block; display: block;
width: 1.2em; width: 1.2em;