Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -788,43 +788,63 @@ custom_css = """
|
|
| 788 |
}
|
| 789 |
}
|
| 790 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 791 |
@media (prefers-color-scheme: light) {
|
| 792 |
-
|
| 793 |
-
.gradio-container .gr-radio label:has(input[type="radio"]:checked),
|
| 794 |
-
.gradio-container .gr-radio .wrap label:has(input[type="radio"]:checked) {
|
| 795 |
background: #eef2ff !important;
|
| 796 |
-
border:
|
| 797 |
-
|
| 798 |
-
padding: 10px 12px !important;
|
| 799 |
}
|
|
|
|
| 800 |
|
| 801 |
-
|
| 802 |
-
.gradio-container .gr-radio label
|
| 803 |
-
|
| 804 |
-
|
| 805 |
-
|
| 806 |
-
|
| 807 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 808 |
border-radius: 10px !important;
|
|
|
|
|
|
|
| 809 |
}
|
| 810 |
}
|
| 811 |
|
| 812 |
@media (prefers-color-scheme: dark) {
|
| 813 |
-
.gradio-container .gr-radio label
|
| 814 |
-
.gradio-container .gr-radio
|
| 815 |
background: #1f2937 !important;
|
| 816 |
border: 1px solid #374151 !important;
|
| 817 |
border-radius: 10px !important;
|
| 818 |
padding: 10px 12px !important;
|
| 819 |
-
|
| 820 |
-
|
| 821 |
-
.gradio-container .gr-radio label,
|
| 822 |
-
.gradio-container .gr-radio .wrap label {
|
| 823 |
-
display: flex !important;
|
| 824 |
-
align-items: center !important;
|
| 825 |
-
gap: 10px !important;
|
| 826 |
-
padding: 8px 12px !important;
|
| 827 |
-
border-radius: 10px !important;
|
| 828 |
}
|
| 829 |
}
|
| 830 |
"""
|
|
|
|
| 788 |
}
|
| 789 |
}
|
| 790 |
|
| 791 |
+
/* ===============================
|
| 792 |
+
★Radioの「選択中」を確実に見えるように(:has() 不要版)
|
| 793 |
+
=============================== */
|
| 794 |
+
|
| 795 |
+
/* まず選択肢の並びを「行っぽく」整える */
|
| 796 |
+
.gradio-container .gr-radio label {
|
| 797 |
+
display: flex !important;
|
| 798 |
+
align-items: center !important;
|
| 799 |
+
gap: 10px !important;
|
| 800 |
+
margin: 6px 0 !important;
|
| 801 |
+
}
|
| 802 |
+
|
| 803 |
+
/* labelの中にある “文字部分” が span のケースが多いので、spanを箱にする */
|
| 804 |
+
.gradio-container .gr-radio label > span {
|
| 805 |
+
display: block !important;
|
| 806 |
+
padding: 10px 12px !important;
|
| 807 |
+
border-radius: 10px !important;
|
| 808 |
+
border: 1px solid transparent !important;
|
| 809 |
+
}
|
| 810 |
+
|
| 811 |
+
/* checked のとき、inputの直後のspanをハイライト */
|
| 812 |
@media (prefers-color-scheme: light) {
|
| 813 |
+
.gradio-container .gr-radio label > input[type="radio"]:checked + span {
|
|
|
|
|
|
|
| 814 |
background: #eef2ff !important;
|
| 815 |
+
border-color: #c7d2fe !important;
|
| 816 |
+
color: #111 !important;
|
|
|
|
| 817 |
}
|
| 818 |
+
}
|
| 819 |
|
| 820 |
+
@media (prefers-color-scheme: dark) {
|
| 821 |
+
.gradio-container .gr-radio label > input[type="radio"]:checked + span {
|
| 822 |
+
background: #1f2937 !important;
|
| 823 |
+
border-color: #374151 !important;
|
| 824 |
+
color: #f0f0f0 !important;
|
| 825 |
+
}
|
| 826 |
+
}
|
| 827 |
+
|
| 828 |
+
/* もし span じゃなく div になってる版のGradioでも効くように追加(保険) */
|
| 829 |
+
@media (prefers-color-scheme: light) {
|
| 830 |
+
.gradio-container .gr-radio label > input[type="radio"]:checked + div,
|
| 831 |
+
.gradio-container .gr-radio label > input[type="radio"]:checked + p {
|
| 832 |
+
background: #eef2ff !important;
|
| 833 |
+
border: 1px solid #c7d2fe !important;
|
| 834 |
border-radius: 10px !important;
|
| 835 |
+
padding: 10px 12px !important;
|
| 836 |
+
color: #111 !important;
|
| 837 |
}
|
| 838 |
}
|
| 839 |
|
| 840 |
@media (prefers-color-scheme: dark) {
|
| 841 |
+
.gradio-container .gr-radio label > input[type="radio"]:checked + div,
|
| 842 |
+
.gradio-container .gr-radio label > input[type="radio"]:checked + p {
|
| 843 |
background: #1f2937 !important;
|
| 844 |
border: 1px solid #374151 !important;
|
| 845 |
border-radius: 10px !important;
|
| 846 |
padding: 10px 12px !important;
|
| 847 |
+
color: #f0f0f0 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 848 |
}
|
| 849 |
}
|
| 850 |
"""
|