better hover styling

This commit is contained in:
Nikita Krupin committed 2022-01-10 17:22:16 -05:00
1 parent 7c9a80a629
commit 93d9b941e6
1 file changed
+3 -6
+3 -6
View File
@@ -68,15 +68,13 @@ button:hover {
border-radius: .25rem; border-radius: .25rem;
} }
.switch::before { .switch:before {
content: attr(data-hover); content: attr(data-hover);
visibility: hidden; visibility: hidden;
opacity: 0;
width: 250px; width: 250px;
background-color: var(--secondary); background-color: var(--secondary);
border-radius: .5rem; border-radius: .5rem;
padding: .25rem .5rem; padding: .5rem;
transition: opacity .2 ease-in-out;
position: absolute; position: absolute;
z-index: 1; z-index: 1;
@@ -84,8 +82,7 @@ button:hover {
top: 160%; top: 160%;
} }
.switch:hover::before { .switch:hover:before {
opacity: 1;
visibility: visible; visibility: visible;
} }