fix: use html classes instead of :global() for input modality styles

The :global() pseudo-class in Vue scoped SFC styles was being mangled
by the Vue compiler, producing broken CSS that applied properties like
z-index and opacity directly to the <html> element and dropped the
intended component selectors entirely.

Replace the html[data-mouse-active] / html[data-pointer-visible] data
attribute approach with plain CSS classes (mouse-active, pointer-visible)
toggled on document.documentElement. In Vue scoped styles, prefixing a
selector with html.mouse-active or html:not(.mouse-active) compiles
correctly — the html part stays global while the component selector
receives the scoped attribute — avoiding :global() entirely.

This keeps all component styles inside <style scoped> and fixes the
layout breakage caused by the original commit.
This commit is contained in:
2026-05-23 21:57:59 +00:00
parent 79dc1b25cc
commit 2f83193ff4
7 changed files with 48 additions and 49 deletions
@@ -312,7 +312,7 @@ function handleActivate(event: MouseEvent | KeyboardEvent) {
grid-template-columns: minmax(0, 1fr) max-content max-content;
}
:global(html[data-mouse-active="true"]) .version-row:hover {
html.mouse-active .version-row:hover {
background: rgba(10, 14, 22, 0.28);
border-color: rgba(255, 255, 255, 0.2);
}
@@ -322,7 +322,7 @@ function handleActivate(event: MouseEvent | KeyboardEvent) {
background: rgba(10, 14, 22, 0.2);
}
:global(html[data-mouse-active="true"]) .version-row.version-best:hover {
html.mouse-active .version-row.version-best:hover {
background: rgba(10, 14, 22, 0.28);
border-color: rgba(255, 255, 255, 0.2);
}
@@ -533,8 +533,8 @@ function handleActivate(event: MouseEvent | KeyboardEvent) {
cursor: pointer;
}
:global(html[data-mouse-active="true"]) .ctx-btn:hover:not(:disabled),
:global(html[data-mouse-active="false"]) .ctx-btn.nav-focused:not(:disabled),
html.mouse-active .ctx-btn:hover:not(:disabled),
html:not(.mouse-active) .ctx-btn.nav-focused:not(:disabled),
.ctx-btn:focus-visible:not(:disabled) {
background: rgba(255, 255, 255, 0.16);
border-color: rgba(255, 255, 255, 0.35);