Change :before to ::before becasue they are pseudo elements

This commit is contained in:
Harry Allen authored and GitHub committed 2022-05-28 13:45:07 -07:00
1 parent 16b1c2ccf0
commit 98861c18b1
1 file changed
+4 -4
+4 -4
View File
@@ -68,7 +68,7 @@ button:hover {
border-radius: 0.25rem; border-radius: 0.25rem;
} }
.switch:before { .switch::before {
content: attr(data-hover); content: attr(data-hover);
visibility: hidden; visibility: hidden;
width: 250px; width: 250px;
@@ -82,7 +82,7 @@ button:hover {
top: 160%; top: 160%;
} }
.switch:hover:before { .switch:hover::before {
visibility: visible; visibility: visible;
} }
@@ -162,7 +162,7 @@ button:hover {
border-radius: 34px; border-radius: 34px;
} }
.slider:before { .slider::before {
position: absolute; position: absolute;
content: ""; content: "";
height: 13px; height: 13px;
@@ -178,7 +178,7 @@ input:checked + .slider {
background: var(--accent); background: var(--accent);
} }
input:checked + .slider:before { input:checked + .slider::before {
transform: translateX(13px); transform: translateX(13px);
background: var(--primary); background: var(--primary);
} }