Skip to content

Commit 2043967

Browse files
pngwngradio-pr-botfreddyaboulton
authored
fix font (#12375)
* fix font * add changeset * tweaks * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Freddy Boulton <41651716+freddyaboulton@users.noreply.github.com>
1 parent 9ea6686 commit 2043967

File tree

4 files changed

+27
-6
lines changed

4 files changed

+27
-6
lines changed

.changeset/modern-items-clap.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@gradio/checkbox": minor
3+
"@gradio/checkboxgroup": minor
4+
"@gradio/radio": minor
5+
"gradio": minor
6+
---
7+
8+
feat:fix font

js/checkbox/shared/Checkbox.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
}
4444
</script>
4545

46-
<label class="checkbox-container">
46+
<label class="checkbox-container" class:disabled>
4747
<input
4848
bind:checked={gradio.props.value}
4949
on:keydown={handle_enter}
@@ -70,7 +70,7 @@
7070
7171
.label-text {
7272
color: var(--body-text-color);
73-
font-size: var(--text-sm);
73+
font-size: var(--checkbox-label-text-size);
7474
line-height: var(--line-sm);
7575
}
7676
@@ -146,6 +146,11 @@
146146
147147
input[disabled] {
148148
cursor: not-allowed;
149+
opacity: 0.75;
150+
}
151+
152+
label.disabled {
153+
cursor: not-allowed;
149154
}
150155
151156
input:not([disabled]):hover {

js/checkboxgroup/Index.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,11 @@
206206
207207
input[disabled],
208208
.disabled {
209-
cursor: not-allowed;
209+
cursor: not-allowed !important;
210+
}
211+
212+
input[disabled] {
213+
opacity: 0.75;
210214
}
211215
212216
input:hover {

js/radio/shared/Radio.svelte

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@
110110
background-color: white;
111111
}
112112
113-
input:hover {
113+
input:hover:not([disabled]) {
114114
border-color: var(--checkbox-border-color-hover);
115115
background-color: var(--checkbox-background-color-hover);
116116
}
117117
118-
input:focus {
118+
input:focus:not([disabled]) {
119119
border-color: var(--checkbox-border-color-focus);
120120
background-color: var(--checkbox-background-color-focus);
121121
}
122122
123-
input:checked:focus {
123+
input:checked:focus:not([disabled]) {
124124
border-color: var(--checkbox-border-color-focus);
125125
background-image: var(--radio-circle);
126126
background-color: var(--checkbox-background-color-selected);
@@ -130,4 +130,8 @@
130130
.disabled {
131131
cursor: not-allowed;
132132
}
133+
134+
input[disabled] {
135+
opacity: 0.75;
136+
}
133137
</style>

0 commit comments

Comments
 (0)