chrissoria commited on
Commit
e0e2c93
·
1 Parent(s): fcd6a6e

Fix mobile file upload SVG icon size and radio button layout

Browse files
Files changed (1) hide show
  1. app.py +57 -0
app.py CHANGED
@@ -1211,6 +1211,20 @@ custom_css = """
1211
  min-width: 150px !important;
1212
  }
1213
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1214
  /* Expandable plot styles */
1215
  .expandable-plot {
1216
  min-height: 400px !important;
@@ -1268,6 +1282,15 @@ custom_css = """
1268
  flex: 1 1 100% !important;
1269
  }
1270
 
 
 
 
 
 
 
 
 
 
1271
  /* Smaller task buttons on mobile */
1272
  .task-btn {
1273
  min-width: 100px !important;
@@ -1275,9 +1298,19 @@ custom_css = """
1275
  font-size: 13px !important;
1276
  }
1277
 
 
 
 
 
 
 
 
 
 
1278
  /* Compact file upload areas */
1279
  .file-upload, .upload-button, [data-testid="file"], .gr-file {
1280
  min-height: 80px !important;
 
1281
  padding: 10px !important;
1282
  }
1283
 
@@ -1420,6 +1453,30 @@ custom_css = """
1420
  width: 100% !important;
1421
  min-width: unset !important;
1422
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1423
  }
1424
  """
1425
 
 
1211
  min-width: 150px !important;
1212
  }
1213
 
1214
+ /* Global fix for file upload SVG icons - affects all screen sizes */
1215
+ button[aria-label*="pload"] svg,
1216
+ button[aria-label*="ile"] svg,
1217
+ .wrap svg,
1218
+ [data-testid="file"] svg,
1219
+ .upload-container svg {
1220
+ width: 48px !important;
1221
+ height: 48px !important;
1222
+ max-width: 48px !important;
1223
+ max-height: 48px !important;
1224
+ min-width: 24px !important;
1225
+ min-height: 24px !important;
1226
+ }
1227
+
1228
  /* Expandable plot styles */
1229
  .expandable-plot {
1230
  min-height: 400px !important;
 
1282
  flex: 1 1 100% !important;
1283
  }
1284
 
1285
+ /* Force radio buttons to wrap on mobile */
1286
+ [data-testid="radio-group"], .gr-radio-group, .radio-group {
1287
+ flex-wrap: wrap !important;
1288
+ }
1289
+
1290
+ [data-testid="radio-group"] > *, .gr-radio-group > * {
1291
+ flex: 0 0 auto !important;
1292
+ }
1293
+
1294
  /* Smaller task buttons on mobile */
1295
  .task-btn {
1296
  min-width: 100px !important;
 
1298
  font-size: 13px !important;
1299
  }
1300
 
1301
+ /* CRITICAL: Fix Safari file upload icon size */
1302
+ .file-upload svg, .upload-button svg, [data-testid="file"] svg,
1303
+ .gr-file svg, button svg, .upload svg {
1304
+ max-width: 48px !important;
1305
+ max-height: 48px !important;
1306
+ width: 48px !important;
1307
+ height: 48px !important;
1308
+ }
1309
+
1310
  /* Compact file upload areas */
1311
  .file-upload, .upload-button, [data-testid="file"], .gr-file {
1312
  min-height: 80px !important;
1313
+ max-height: 120px !important;
1314
  padding: 10px !important;
1315
  }
1316
 
 
1453
  width: 100% !important;
1454
  min-width: unset !important;
1455
  }
1456
+
1457
+ /* More aggressive SVG fix for Safari on small screens */
1458
+ svg {
1459
+ max-width: 40px !important;
1460
+ max-height: 40px !important;
1461
+ }
1462
+
1463
+ /* File upload button - limit the whole container */
1464
+ [data-testid="block"] button[aria-label*="Upload"],
1465
+ [data-testid="block"] button[aria-label*="upload"],
1466
+ .upload-button, .file-upload button {
1467
+ max-height: 100px !important;
1468
+ overflow: hidden !important;
1469
+ }
1470
+
1471
+ /* Force radio group to stack vertically */
1472
+ [data-testid="radio-group"] {
1473
+ flex-direction: column !important;
1474
+ align-items: flex-start !important;
1475
+ }
1476
+
1477
+ [data-testid="radio-group"] label {
1478
+ margin-bottom: 4px !important;
1479
+ }
1480
  }
1481
  """
1482