chrissoria commited on
Commit
28fe50a
·
1 Parent(s): 2b0189e

Scale down desktop layout on mobile using CSS zoom

Browse files
Files changed (1) hide show
  1. app.py +17 -5
app.py CHANGED
@@ -1208,15 +1208,27 @@ custom_css = """
1208
  font-family: Helvetica, Arial, sans-serif !important;
1209
  }
1210
 
1211
- /* Force desktop layout on all devices */
1212
- body, .gradio-container, .main, .contain {
1213
- min-width: 900px !important;
1214
- }
1215
-
1216
  .task-btn {
1217
  min-width: 150px !important;
1218
  }
1219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1220
  /* Expandable plot styles */
1221
  .expandable-plot {
1222
  min-height: 400px !important;
 
1208
  font-family: Helvetica, Arial, sans-serif !important;
1209
  }
1210
 
 
 
 
 
 
1211
  .task-btn {
1212
  min-width: 150px !important;
1213
  }
1214
 
1215
+ /* Scale down on mobile to show desktop layout */
1216
+ @media screen and (max-width: 768px) {
1217
+ .gradio-container {
1218
+ zoom: 0.8;
1219
+ -moz-transform: scale(0.8);
1220
+ -moz-transform-origin: 0 0;
1221
+ }
1222
+ }
1223
+
1224
+ @media screen and (max-width: 480px) {
1225
+ .gradio-container {
1226
+ zoom: 0.65;
1227
+ -moz-transform: scale(0.65);
1228
+ -moz-transform-origin: 0 0;
1229
+ }
1230
+ }
1231
+
1232
  /* Expandable plot styles */
1233
  .expandable-plot {
1234
  min-height: 400px !important;