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:
@@ -211,13 +211,13 @@ const matchedPeople = computed(() => {
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
:global(html[data-mouse-active="true"]) .media-card:hover .card-focus-outline,
|
||||
:global(html[data-mouse-active="false"]) .media-card.nav-focused .card-focus-outline {
|
||||
html.mouse-active .media-card:hover .card-focus-outline,
|
||||
html:not(.mouse-active) .media-card.nav-focused .card-focus-outline {
|
||||
opacity: 1;
|
||||
animation: card-outline-blink 1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
:global(html[data-mouse-active="false"]) .media-card.nav-focused .card-focus-outline rect {
|
||||
html:not(.mouse-active) .media-card.nav-focused .card-focus-outline rect {
|
||||
stroke: #ffffff;
|
||||
stroke-width: 5;
|
||||
filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
|
||||
|
||||
Reference in New Issue
Block a user