Spaces:
Running on Zero
Running on Zero
UI: fix card border-radius, themed textarea+number input, panel spacing
Browse files
app.py
CHANGED
|
@@ -737,14 +737,22 @@ CSS = """
|
|
| 737 |
|
| 738 |
/* ββ CARDS / BLOCKS β frosted glass (Gradio 6: .block) ββ */
|
| 739 |
.gradio-container .block {
|
| 740 |
-
background: rgba(255, 255, 255, 0.
|
| 741 |
-
backdrop-filter: blur(
|
| 742 |
-
-webkit-backdrop-filter: blur(
|
| 743 |
-
border: 1px solid rgba(255, 255, 255, 0.
|
| 744 |
-
border-radius:
|
| 745 |
box-shadow:
|
| 746 |
-
0
|
| 747 |
-
inset 0 1px 0 rgba(255, 255, 255, 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 748 |
}
|
| 749 |
|
| 750 |
/* Image/video upload drop zones β target the drop zone inside .block */
|
|
@@ -752,17 +760,26 @@ CSS = """
|
|
| 752 |
.gradio-container .block [data-testid="image"],
|
| 753 |
.gradio-container .upload-container,
|
| 754 |
.gradio-container [data-testid="image"] {
|
| 755 |
-
background: rgba(255, 255, 255, 0.
|
| 756 |
-
border: 2px dashed rgba(100, 200, 255, 0.
|
| 757 |
-
border-radius:
|
| 758 |
transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
|
|
|
|
| 759 |
}
|
| 760 |
.gradio-container .block .upload-container:hover,
|
| 761 |
.gradio-container .block [data-testid="image"]:hover,
|
| 762 |
.gradio-container .upload-container:hover,
|
| 763 |
.gradio-container [data-testid="image"]:hover {
|
| 764 |
-
border-color: rgba(0, 229, 200, 0.
|
| 765 |
-
box-shadow: 0 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 766 |
}
|
| 767 |
|
| 768 |
/* ββ LABELS β crisp white with subtle glow ββ */
|
|
@@ -774,20 +791,26 @@ CSS = """
|
|
| 774 |
|
| 775 |
/* ββ TEXT INPUTS & TEXTBOX β glass borders ββ */
|
| 776 |
.gradio-container input[type="text"],
|
| 777 |
-
.gradio-container textarea
|
| 778 |
-
|
| 779 |
-
|
|
|
|
|
|
|
| 780 |
border-radius: 10px !important;
|
| 781 |
color: #e8ecf4 !important;
|
| 782 |
-
box-shadow: inset 0 2px
|
| 783 |
transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
|
|
|
|
|
|
|
| 784 |
}
|
| 785 |
.gradio-container input[type="text"]:focus,
|
| 786 |
-
.gradio-container textarea:focus
|
| 787 |
-
|
|
|
|
|
|
|
| 788 |
box-shadow:
|
| 789 |
-
inset 0 2px
|
| 790 |
-
0 0
|
| 791 |
outline: none !important;
|
| 792 |
}
|
| 793 |
|
|
@@ -837,13 +860,25 @@ CSS = """
|
|
| 837 |
box-shadow: 0 0 18px rgba(0, 229, 200, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
|
| 838 |
}
|
| 839 |
|
| 840 |
-
/* Number inputs */
|
| 841 |
-
.gradio-container input[type="number"]
|
| 842 |
-
|
| 843 |
-
|
|
|
|
| 844 |
border-radius: 8px !important;
|
| 845 |
color: #e8ecf4 !important;
|
| 846 |
-
box-shadow: inset 0 2px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 847 |
}
|
| 848 |
|
| 849 |
/* ββ DROPDOWN / SELECT (Gradio 6: combobox input) ββ */
|
|
|
|
| 737 |
|
| 738 |
/* ββ CARDS / BLOCKS β frosted glass (Gradio 6: .block) ββ */
|
| 739 |
.gradio-container .block {
|
| 740 |
+
background: rgba(255, 255, 255, 0.05) !important;
|
| 741 |
+
backdrop-filter: blur(20px) saturate(1.5) !important;
|
| 742 |
+
-webkit-backdrop-filter: blur(20px) saturate(1.5) !important;
|
| 743 |
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
| 744 |
+
border-radius: 16px !important;
|
| 745 |
box-shadow:
|
| 746 |
+
0 8px 32px rgba(0, 0, 0, 0.35),
|
| 747 |
+
inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
|
| 748 |
+
margin-bottom: 8px !important;
|
| 749 |
+
}
|
| 750 |
+
/* Override Gradio's high-specificity scoped card rules */
|
| 751 |
+
.gradio-container .contain .block,
|
| 752 |
+
.gradio-container .gr-block,
|
| 753 |
+
.gradio-container .panel,
|
| 754 |
+
.gradio-container > div > div > div > div {
|
| 755 |
+
border-radius: 16px !important;
|
| 756 |
}
|
| 757 |
|
| 758 |
/* Image/video upload drop zones β target the drop zone inside .block */
|
|
|
|
| 760 |
.gradio-container .block [data-testid="image"],
|
| 761 |
.gradio-container .upload-container,
|
| 762 |
.gradio-container [data-testid="image"] {
|
| 763 |
+
background: rgba(255, 255, 255, 0.04) !important;
|
| 764 |
+
border: 2px dashed rgba(100, 200, 255, 0.3) !important;
|
| 765 |
+
border-radius: 14px !important;
|
| 766 |
transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
|
| 767 |
+
padding: 16px !important;
|
| 768 |
}
|
| 769 |
.gradio-container .block .upload-container:hover,
|
| 770 |
.gradio-container .block [data-testid="image"]:hover,
|
| 771 |
.gradio-container .upload-container:hover,
|
| 772 |
.gradio-container [data-testid="image"]:hover {
|
| 773 |
+
border-color: rgba(0, 229, 200, 0.6) !important;
|
| 774 |
+
box-shadow: 0 0 24px rgba(0, 229, 200, 0.12) !important;
|
| 775 |
+
}
|
| 776 |
+
|
| 777 |
+
/* ββ SPACING β breathing room between blocks ββ */
|
| 778 |
+
.gradio-container .row {
|
| 779 |
+
gap: 16px !important;
|
| 780 |
+
}
|
| 781 |
+
.gradio-container .column {
|
| 782 |
+
gap: 12px !important;
|
| 783 |
}
|
| 784 |
|
| 785 |
/* ββ LABELS β crisp white with subtle glow ββ */
|
|
|
|
| 791 |
|
| 792 |
/* ββ TEXT INPUTS & TEXTBOX β glass borders ββ */
|
| 793 |
.gradio-container input[type="text"],
|
| 794 |
+
.gradio-container textarea,
|
| 795 |
+
.gradio-container .wrap textarea,
|
| 796 |
+
.gradio-container .wrap input[type="text"] {
|
| 797 |
+
background: rgba(10, 15, 40, 0.7) !important;
|
| 798 |
+
border: 1px solid rgba(100, 180, 255, 0.25) !important;
|
| 799 |
border-radius: 10px !important;
|
| 800 |
color: #e8ecf4 !important;
|
| 801 |
+
box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3) !important;
|
| 802 |
transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
|
| 803 |
+
padding: 10px 12px !important;
|
| 804 |
+
font-size: 14px !important;
|
| 805 |
}
|
| 806 |
.gradio-container input[type="text"]:focus,
|
| 807 |
+
.gradio-container textarea:focus,
|
| 808 |
+
.gradio-container .wrap textarea:focus,
|
| 809 |
+
.gradio-container .wrap input[type="text"]:focus {
|
| 810 |
+
border-color: rgba(108, 92, 231, 0.7) !important;
|
| 811 |
box-shadow:
|
| 812 |
+
inset 0 2px 8px rgba(0, 0, 0, 0.3),
|
| 813 |
+
0 0 16px rgba(108, 92, 231, 0.25) !important;
|
| 814 |
outline: none !important;
|
| 815 |
}
|
| 816 |
|
|
|
|
| 860 |
box-shadow: 0 0 18px rgba(0, 229, 200, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
|
| 861 |
}
|
| 862 |
|
| 863 |
+
/* Number inputs β themed glass */
|
| 864 |
+
.gradio-container input[type="number"],
|
| 865 |
+
.gradio-container .wrap input[type="number"] {
|
| 866 |
+
background: rgba(10, 15, 40, 0.7) !important;
|
| 867 |
+
border: 1px solid rgba(100, 180, 255, 0.25) !important;
|
| 868 |
border-radius: 8px !important;
|
| 869 |
color: #e8ecf4 !important;
|
| 870 |
+
box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3) !important;
|
| 871 |
+
padding: 8px 10px !important;
|
| 872 |
+
font-size: 14px !important;
|
| 873 |
+
transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
|
| 874 |
+
}
|
| 875 |
+
.gradio-container input[type="number"]:focus,
|
| 876 |
+
.gradio-container .wrap input[type="number"]:focus {
|
| 877 |
+
border-color: rgba(108, 92, 231, 0.7) !important;
|
| 878 |
+
box-shadow:
|
| 879 |
+
inset 0 2px 8px rgba(0, 0, 0, 0.3),
|
| 880 |
+
0 0 16px rgba(108, 92, 231, 0.25) !important;
|
| 881 |
+
outline: none !important;
|
| 882 |
}
|
| 883 |
|
| 884 |
/* ββ DROPDOWN / SELECT (Gradio 6: combobox input) ββ */
|