Fix spectrum bug with larger checkboxes

This commit is contained in:
Andrew Kingston 2021-11-03 11:02:59 +00:00
parent 212e62b62e
commit bea7a5955e
1 changed files with 16 additions and 0 deletions

View File

@ -21,6 +21,7 @@
<label <label
class="spectrum-Checkbox spectrum-Checkbox--emphasized {sizeClass}" class="spectrum-Checkbox spectrum-Checkbox--emphasized {sizeClass}"
class:is-invalid={!!error} class:is-invalid={!!error}
class:checked={value}
> >
<input <input
checked={value} checked={value}
@ -50,6 +51,21 @@
</label> </label>
<style> <style>
.spectrum-Checkbox--sizeM .spectrum-Checkbox-checkmark {
transform: scale(1);
left: 49%;
top: 50%;
}
.spectrum-Checkbox--sizeL .spectrum-Checkbox-checkmark {
transform: scale(1.1);
left: 55%;
top: 55%;
}
.spectrum-Checkbox--sizeXL .spectrum-Checkbox-checkmark {
transform: scale(1.2);
left: 60%;
top: 60%;
}
.spectrum-Checkbox-input { .spectrum-Checkbox-input {
opacity: 0; opacity: 0;
} }