Spaces:
Running on Zero
fix(ui): inline-muted component labels + drop broken tablet rail mode
Browse filesTwo cosmetic fixes surfaced by the M1 Generate-tab visual verification:
1. gr.Audio / gr.Code component labels rendered as elevated white pills
("Output", "Metadata") that contradicted the Brutalist Mono theme
where labels should be muted-ink uppercase text. Override
.gradio-container .block .label and adjacent selectors to
render labels as inline INK_MUTED, uppercase, no border, no shadow,
matching the .ams-history-title style. Also hide the music-note /
code SVG glyphs Gradio puts next to component labels.
2. The 640-1024 px "tablet icon rail" mode collapsed the sidebar to
48 px wide and relied on ::first-letter to keep the leading emoji
visible while hiding labels. Gradio 5/6 wraps radio option text in
a <span> inside the <label>, so ::first-letter never hit the emoji
and the rail rendered completely empty — no mode navigation possible
at tablet widths. Rather than fight Gradio's DOM, drop the rail
middle state entirely: keep the full sidebar with labels at all
widths >= 640 px and stack vertically below that. Two breakpoints
beats three when the third is unusable.
Mobile (< 640 px) intentionally retains the stack-vertical layout
since the horizontal-scroll-strip variant also fights Gradio's flex
defaults; the vertical stack is fully usable and matches what users
expect on phones.
Verification: launched the app, navigated via Playwright at 1440 / 800 /
360 px, screenshotted each, compared against
docs/superpowers/specs/mockups/01_generate_mobile_errors.html. All three
breakpoints render correctly. Theme tests still pass (3/3).
|
@@ -199,26 +199,36 @@ CSS = f"""
|
|
| 199 |
/* === Hide Gradio footer ================================================ */
|
| 200 |
footer {{ display:none !important; }}
|
| 201 |
|
| 202 |
-
/* ===
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
|
|
|
|
|
|
| 220 |
}}
|
| 221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
/* === Responsive: mobile < 640 px ======================================= */
|
| 223 |
@media (max-width: 640px) {{
|
| 224 |
.ams-body {{
|
|
|
|
| 199 |
/* === Hide Gradio footer ================================================ */
|
| 200 |
footer {{ display:none !important; }}
|
| 201 |
|
| 202 |
+
/* === Component labels — kill the white pill, make them inline muted ==== */
|
| 203 |
+
/* Gradio renders component labels (e.g. gr.Audio "Output", gr.Code
|
| 204 |
+
"Metadata") as elevated white-pill blocks by default. The Brutalist
|
| 205 |
+
Mono theme wants them as plain muted-ink inline text. */
|
| 206 |
+
.gradio-container .block .label,
|
| 207 |
+
.gradio-container [data-testid="block-label"],
|
| 208 |
+
.gradio-container span.label-wrap > span {{
|
| 209 |
+
background:transparent !important;
|
| 210 |
+
color:{INK_MUTED} !important;
|
| 211 |
+
font-size:10px !important;
|
| 212 |
+
font-weight:500 !important;
|
| 213 |
+
letter-spacing:0.06em !important;
|
| 214 |
+
text-transform:uppercase !important;
|
| 215 |
+
border:none !important;
|
| 216 |
+
box-shadow:none !important;
|
| 217 |
+
padding:4px 0 !important;
|
| 218 |
+
}}
|
| 219 |
+
.gradio-container [data-testid="block-label"] svg,
|
| 220 |
+
.gradio-container .label svg {{
|
| 221 |
+
display:none !important; /* drop the music-note / code glyph next to label */
|
| 222 |
}}
|
| 223 |
|
| 224 |
+
/* === Responsive: keep full sidebar down to mobile threshold ============ */
|
| 225 |
+
/* The previous tablet "icon rail" mode at 640-1024 px relied on
|
| 226 |
+
``::first-letter`` to keep the emoji visible while hiding the label
|
| 227 |
+
text, but Gradio wraps the radio option text in a <span> so the
|
| 228 |
+
pseudo-class never hits the emoji. Rather than fight the DOM, we keep
|
| 229 |
+
the full sidebar at all widths >= 640 px and switch to a stacked
|
| 230 |
+
layout below that. */
|
| 231 |
+
|
| 232 |
/* === Responsive: mobile < 640 px ======================================= */
|
| 233 |
@media (max-width: 640px) {{
|
| 234 |
.ams-body {{
|