Skip to content

Commit

Permalink
Use classname instead of type
Browse files Browse the repository at this point in the history
  • Loading branch information
sigridge committed Aug 29, 2024
1 parent 2e8228a commit f2f8731
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions frontend/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
line-height: 2.5rem;
}

input[type="checkbox"] {
.checkBoxWithCustomCheckmark {
/* Add if not using autoprefixer */
-webkit-appearance: none;
appearance: none;
Expand All @@ -167,13 +167,14 @@
margin: 0;
}

input[type="checkbox"] {
.checkBoxWithCustomCheckmark {
appearance: none;
display: grid;
place-content: center;
}

input[type="checkbox"]::before {
/*Here an svg has been converted to a clip-path, which is why that field is so long*/
.checkBoxWithCustomCheckmark::before {
content: "";
width: 12px;
height: 12px;
Expand Down Expand Up @@ -244,11 +245,11 @@
);
}

input[type="checkbox"]:checked {
.checkBoxWithCustomCheckmark:checked {
background-color: #423d89;
}

input[type="checkbox"]:checked::before {
.checkBoxWithCustomCheckmark:checked::before {
transform: scale(1);
}
}
2 changes: 1 addition & 1 deletion frontend/src/components/Buttons/FilterButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function FilterButton({
disabled={inputProps.disabled}
readOnly
{...inputProps}
className={`border flex items-center border-opacity-50 m-[1px] mr-2 h-4 w-4 border-primary hover:border-primary
className={`checkBoxWithCustomCheckmark border flex items-center border-opacity-50 m-[1px] mr-2 h-4 w-4 border-primary hover:border-primary
${
inputProps.checked
Expand Down

0 comments on commit f2f8731

Please sign in to comment.