Skip to content

Commit

Permalink
Merge pull request #82 from Siumauricio/fix/#39
Browse files Browse the repository at this point in the history
refactor(checkbox, radio, range, switch): set static white value
  • Loading branch information
Siumauricio authored Mar 5, 2023
2 parents b5d5bf7 + f3ccb18 commit 449fabf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions components/inputs/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
--checkbox-border-checked: rgb(var(--primary));
--checkbox-border-hover: rgb(var(--gray-7));
--checkbox-bg-hover: rgb(var(--gray-3));
--checkline-color: rgb(var(--white));
--checkline-color: rgb(255 255 255);
transition: background 0.3s, border-color 0.3s, box-shadow 0.2s;
@apply relative m-0 inline-block h-5 w-5 cursor-pointer appearance-none rounded-md border border-[var(--checkbox-border)] bg-[var(--checkbox-bg)] align-top accent-backgroundPrimary outline-none focus:outline-2 focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-primary;
}
Expand All @@ -28,7 +28,7 @@
}

.checkbox:disabled {
@apply border-gray-7 bg-gray-7 cursor-not-allowed opacity-50;
@apply cursor-not-allowed border-gray-7 bg-gray-7 opacity-50;
}

.checkbox:disabled + label {
Expand Down
4 changes: 2 additions & 2 deletions components/inputs/radio.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
--radio-border-checked: rgb(var(--primary));
--radio-border-hover: rgb(var(--gray-7));
--radio-bg-hover: rgb(var(--gray-3));
--checkline-color: rgb(var(--white));
--checkline-color: rgb(255 255 255);
transition: background 0.3s, border-color 0.3s, box-shadow 0.2s;
@apply relative m-0 flex h-5 w-5 cursor-pointer appearance-none items-center justify-center rounded-full border border-[var(--radio-border)] bg-[var(--radio-bg)] align-top accent-backgroundPrimary focus:outline-2 focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-primary;
}
Expand All @@ -20,7 +20,7 @@
--r: 43deg;
}
.radio:disabled {
@apply border-gray-7 bg-gray-7 cursor-not-allowed opacity-50;
@apply cursor-not-allowed border-gray-7 bg-gray-7 opacity-50;
}

.radio:disabled + label {
Expand Down
2 changes: 1 addition & 1 deletion components/inputs/range.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.range {
color: rgb(var(--primary));
--circle-color: rgb(var(--white));
--circle-color: rgb(255 255 255);
--left-track-color: rgb(var(--primary));
--circle-border: rgb(var(--primary));
--track-color: rgb(var(--gray-5));
Expand Down
8 changes: 4 additions & 4 deletions components/inputs/switch.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
--switch-border-checked: rgb(var(--primary));
--switch-border-hover: rgb(var(--gray-7));
--switch-bg-hover: rgb(var(--gray-6));
--checkline-color: rgb(var(--white));
--checkline-color: rgb(255 255 255);
--circle-color: rgb(var(--gray-1));
transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
@apply relative m-0 inline-block h-[21px] w-[38px] cursor-pointer appearance-none rounded-xl border border-[var(--switch-border)] bg-[var(--switch-bg)] align-top outline-none focus:outline-2 focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-primary;
Expand All @@ -20,18 +20,18 @@
}

.switch:checked {
--circle-color: rgb(var(--white));
--circle-color: rgb(255 255 255);
@apply border-[var(--switch-border-checked)] bg-[var(--switch-bg-checked)];
--o: 1;
--r: 43deg;
}

.switch:disabled {
@apply border-gray-7 bg-gray-7 cursor-not-allowed opacity-50;
@apply cursor-not-allowed border-gray-7 bg-gray-7 opacity-50;
}

.switch:disabled:checked {
--circle-color: rgb(var(--white));
--circle-color: rgb(255 255 255);
}

.switch:disabled + label {
Expand Down

1 comment on commit 449fabf

@vercel
Copy link

@vercel vercel bot commented on 449fabf Mar 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.