Spaces:
Running on Zero
Running on Zero
File size: 8,657 Bytes
7ebbf86 1a844b7 7ebbf86 1a844b7 7ebbf86 1a844b7 7ebbf86 1a844b7 7ebbf86 1a844b7 7ebbf86 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | /* ==========================================================================
1. GLOBAL & LAYOUT STYLES
========================================================================== */
body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
margin: 0;
padding: 0;
}
/* Main application container styling */
/* Main application container styling */
.gradio-container {
border-radius: 15px;
padding: 10px 20px;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
margin: 10px;
}
/* 2. Media Query for larger screens (desktops) */
@media (min-width: 1281px) {
.gradio-container {
padding: 10px 370px;
max-width: 2400px;
}
}
/* Text shadow for main headings for better readability */
.gradio-container h1 {
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}
/* Utility class to make elements fill their container's width */
/* .fillable {
width: 100% !important;
max-width: unset !important;
} */
.fillable .sidebar-parent {
padding-left: 10px !important;
padding-right: 10px !important;
}
.credit-panel .outer-credits-wrapper .credits-panel-wrapper {
min-height: 80vh !important;
max-height: 700px;
}
.media-gallery-row {
min-height: 80vh !important;
max-height: 700px;
}
/* ==========================================================================
2. CUSTOM SCROLLBAR STYLES (GLOBAL & SIDEBAR)
========================================================================== */
/* --- For WebKit browsers (Chrome, Safari, Edge, etc.) --- */
.sidebar-content::-webkit-scrollbar,
body::-webkit-scrollbar {
width: 8px;
height: 8px;
background-color: transparent;
}
.sidebar-content::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
background: transparent;
border-radius: 10px;
}
.sidebar-content::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
background-color: rgba(136, 136, 136, 0.4);
border-radius: 10px;
border: 2px solid transparent;
background-clip: content-box;
}
.sidebar-content::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
background-color: rgba(136, 136, 136, 0.7);
}
/* --- For Firefox --- */
.sidebar-content,
html {
scrollbar-width: thin;
scrollbar-color: rgba(136, 136, 136, 0.7) transparent;
}
/* ==========================================================================
3. SIDEBAR STYLES
========================================================================== */
.sidebar {
border-radius: 10px;
padding: 10px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
/* .top-bar, .bottom-bar {
border-radius: 10px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
} */
/* Overrides for the content padding inside the sidebar */
.sidebar .sidebar-content {
padding-left: 10px !important;
padding-right: 10px !important;
}
/* Centers text within Markdown blocks inside the sidebar */
.sidebar .sidebar-content .column .block div .prose {
text-align: center;
}
/* Stylish override for the sidebar toggle button */
.sidebar .toggle-button {
background: linear-gradient(90deg, #34d399, #10b981) !important;
border: none;
padding: 12px 18px;
text-transform: uppercase;
font-weight: bold;
letter-spacing: 1px;
border-radius: 5px;
position: absolute;
top: 50%;
right: -28px !important;
left: auto !important;
transform: unset !important;
}
.sidebar.right .toggle-button {
left: -28px !important;
right: auto !important;
transform: rotate(180deg) !important;
}
.sidebar.open .chevron-left {
transform: rotate(-135deg);
}
.top-bar .toggle-top-button, .bottom-bar .toggle-bottom-button {
background: linear-gradient(90deg, #34d399, #10b981) !important;
border: none;
padding: 12px 18px;
text-transform: uppercase;
font-weight: bold;
letter-spacing: 1px;
border-radius: 5px;
cursor: pointer;
transition: transform 0.2s ease-in-out;
/* right: -20px !important; */
}
.toggle-button:hover {
transform: scale(1.05);
}
/* ==========================================================================
4. FLYOUT POPOVER STYLES
========================================================================== */
/* The context area from which the flyout is positioned */
.flyout-context-area {
position: relative !important;
overflow: visible !important; /* Allows flyout to render outside its parent */
}
/* The main flyout container (the popover itself) */
.flyout-container {
position: fixed !important;
z-index: 1000;
width: 350px !important;
background: var(--panel-background-fill, white);
border-radius: var(--radius-lg);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
padding: var(--spacing-lg) !important;
/* Reset flex properties that might be inherited */
flex-grow: 0 !important;
min-width: unset !important;
align-self: center !important;
}
/* Allows tooltips inside a PropertySheet within a flyout to be visible */
.flyout-container .propertysheet-wrapper .content-wrapper .container {
overflow: visible !important;
}
/* The hidden container for the flyout's initial content */
.flyout-source-hidden {
display: none !important;
}
/* The close (X) button for the flyout */
.flyout-close-btn {
position: absolute;
top: 5px;
right: 8px;
z-index: 1001; /* Should be on top of flyout content */
background: transparent !important;
border: none !important;
box-shadow: none !important;
color: #ef0000 !important;
min-width: 24px !important;
width: 24px !important;
height: 24px !important;
padding: 0 !important;
font-size: 1.2em !important;
line-height: 1;
}
/* .flyout-close-btn button:hover {
color: var(--body-text-color) !important;
} */
.flyout-container .block .image-container .icon-button-wrapper {
right: 20px !important
}
.flyout-container .block .image-container > button {
border: none !important;
border-radius: 0 !important;
}
#flyout_sheet > div.content-wrapper > div > div > div > div {
color: var(--button-secondary-text-color);
}
/* ==========================================================================
5. COMPONENT-SPECIFIC STYLES & OVERRIDES
========================================================================== */
/* Custom styling for the cancel button */
#cancel-button { /* Corrected the typo from 'cancell' to 'cancel' */
background: linear-gradient(120deg, var(--neutral-500) 0%, var(--neutral-600) 60%, var(--neutral-700) 100%) !important;
}
.custom-dropdown .wrap-inner input {
padding-right: 22px;
}
/* --- Styles for creating dropdowns with integrated "ear" buttons --- */
/* Container that looks like a single input field */
.fake-input-container {
border: var(--input-border-width) solid var(--border-color-primary);
border-radius: var(--input-radius);
background: var(--block-background-fill) !important;
box-shadow: var(--input-shadow);
transition: box-shadow 0.2s, border-color 0.2s;
padding: 0 !important;
align-items: stretch !important;
gap: 0 !important;
}
.fake-input-container:focus-within {
box-shadow: var(--input-shadow-focus);
border-color: var(--input-border-color-focus);
}
/* Removes the default border from a Gradio dropdown when it's inside our fake container */
.no-border-dropdown .form {
border: none !important;
box-shadow: none !important;
background: transparent !important;
}
/* The settings (gear) button next to the dropdown */
.integrated-ear-btn {
align-self: center;
background: none !important;
border: none !important;
box-shadow: none !important;
color: var(--body-text-color-subdued) !important;
font-size: 1.1em;
min-width: 28px !important;
width: 28px !important;
height: 100% !important;
padding: 20px var(--spacing-sm) 0 0 !important;
transition: color 0.2s ease-in-out;
flex-grow: 0 !important;
}
.integrated-ear-btn:hover {
color: var(--body-text-color) !important;
}
.row-form-size .form {
flex-grow: 0 !important;
min-width: 50% !important;
}
.row-form-size-2 .form {
flex-grow: 0 !important;
min-width: 97% !important;
}
/* --- Misc Component Tweaks --- */
/* Removes the gap from a specific group of settings */
.group {
gap: unset !important;
}
/* Targets a styler inside the sampler group to reset form gap */
.group .styler {
--form-gap-width: 0px !important;
}
/* Example of how to center content in Gradio's example components */
#examples_container {
margin: auto;
width: 90%;
}
#examples_row {
justify-content: center;
} |