Merge pull request #632 from MajesticString/patch-1

Change `:before` to `::before` becasue they are pseudo elements
This commit is contained in:
Dmitrii Selivanov authored and GitHub committed 2022-07-20 00:20:30 +02:00
commit 2a7c7f4be6
1 file changed
+6 -4
+6 -4
View File
@@ -69,7 +69,8 @@ button:hover {
border-radius: 0.25rem; border-radius: 0.25rem;
} }
.switch:before, .label-with-hover-tip:before {
.switch::before, .label-with-hover-tip::before {
content: attr(data-hover); content: attr(data-hover);
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
@@ -85,7 +86,8 @@ button:hover {
top: 160%; top: 160%;
} }
.switch:hover:before, .label-with-hover-tip:hover:before {
.switch:hover::before, .label-with-hover-tip:hover::before {
visibility: visible; visibility: visible;
opacity: 1; opacity: 1;
} }
@@ -217,7 +219,7 @@ button:hover {
border-radius: 34px; border-radius: 34px;
} }
.slider:before { .slider::before {
position: absolute; position: absolute;
content: ""; content: "";
height: 13px; height: 13px;
@@ -233,7 +235,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);
} }