utilize css :where selector

This commit is contained in:
Cade Scroggins
2022-11-17 15:24:44 -08:00
parent 02c7c73dc2
commit 6484140070
+6 -14
View File
@@ -210,8 +210,7 @@
transition: inherit; transition: inherit;
} }
.command:hover .key, .command:hover :where(.key, .name) {
.command:hover .name {
color: var(--color-text); color: var(--color-text);
} }
</style> </style>
@@ -328,12 +327,10 @@
z-index: 1; z-index: 1;
} }
.suggestion:focus, .suggestion:where(:focus, :hover) {
.suggestion:hover {
color: var(--color-background); color: var(--color-background);
} }
.suggestion::before,
.suggestion::before { .suggestion::before {
background-color: var(--color-text); background-color: var(--color-text);
bottom: var(--space-1); bottom: var(--space-1);
@@ -348,8 +345,7 @@
z-index: -1; z-index: -1;
} }
.suggestion:focus::before, .suggestion:where(:focus, :hover)::before {
.suggestion:hover::before {
opacity: 1; opacity: 1;
transform: translateY(0); transform: translateY(0);
} }
@@ -359,8 +355,7 @@
transition: color var(--transition-speed); transition: color var(--transition-speed);
} }
.suggestion:focus .match, .suggestion:where(:focus, :hover) .match {
.suggestion:hover .match {
color: var(--color-background); color: var(--color-background);
} }
@@ -637,15 +632,12 @@
<style> <style>
main { main {
align-items: center; align-items: center;
box-sizing: border-box;
display: flex; display: flex;
height: 100vh; height: 100vh;
justify-content: center; justify-content: center;
width: 100vw;
}
commands-component {
margin: auto;
padding: var(--space-2) var(--space-1); padding: var(--space-2) var(--space-1);
width: 100vw;
} }
</style> </style>