DawnC commited on
Commit
bb33e94
1 Parent(s): 12238e6

Update styles.py

Browse files
Files changed (1) hide show
  1. styles.py +122 -26
styles.py CHANGED
@@ -1158,32 +1158,128 @@ def get_css_styles():
1158
  }
1159
 
1160
  /* Responsive styles */
1161
- @media (max-width: 768px) {
1162
- .container { width: 100% !important; padding: 10px !important; }
1163
- .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
1164
- .tab-nav { display: flex; flex-wrap: nowrap; }
1165
- .tab-nav button {
1166
- white-space: nowrap;
1167
- padding: clamp(8px, 2vw, 16px) !important;
1168
- }
1169
- .image-container img {
1170
- max-width: 100% !important;
1171
- height: auto !important;
1172
- }
1173
- .flex-container { flex-direction: column !important; }
1174
- .upload-box { min-height: 120px !important; }
1175
- .gradio-group { margin: 8px 0 !important; }
1176
-
1177
- /* Improve touch targets */
1178
- button, select, input[type="checkbox"] {
1179
- min-height: 44px !important;
1180
- min-width: 44px !important;
1181
- }
1182
-
1183
- /* Responsive typography */
1184
- h1 { font-size: clamp(1.8rem, 4vw, 2.5em) !important; }
1185
- h2 { font-size: clamp(1rem, 2vw, 1.2em) !important; }
1186
- p { font-size: clamp(0.8rem, 1.5vw, 0.9em) !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1187
  }
 
1188
 
1189
  """
 
1158
  }
1159
 
1160
  /* Responsive styles */
1161
+ @media screen and (max-width: 768px) {
1162
+ /* Base container adjustments */
1163
+ .gradio-container {
1164
+ width: 100% !important;
1165
+ min-width: 100% !important;
1166
+ max-width: 100% !important;
1167
+ padding: 0 !important;
1168
+ margin: 0 !important;
1169
+ }
1170
+
1171
+ /* Tabs improvements */
1172
+ .tabs.svelte-710i53 {
1173
+ overflow-x: auto !important;
1174
+ flex-wrap: nowrap !important;
1175
+ scrollbar-width: none !important;
1176
+ -ms-overflow-style: none !important;
1177
+ }
1178
+
1179
+ .tabs.svelte-710i53::-webkit-scrollbar {
1180
+ display: none !important;
1181
+ }
1182
+
1183
+ /* Layout fixes */
1184
+ .gradio-row {
1185
+ flex-direction: column !important;
1186
+ gap: 10px !important;
1187
+ }
1188
+
1189
+ .gradio-column {
1190
+ width: 100% !important;
1191
+ min-width: 100% !important;
1192
+ }
1193
+
1194
+ /* Image components */
1195
+ .upload-box, .image-container {
1196
+ width: 100% !important;
1197
+ max-width: 100% !important;
1198
+ min-height: 200px !important;
1199
+ }
1200
+
1201
+ /* Form elements */
1202
+ input, select, button {
1203
+ min-height: 44px !important;
1204
+ font-size: 16px !important; /* Prevents iOS zoom */
1205
+ }
1206
+
1207
+ /* Card adjustments */
1208
+ .dog-info-card {
1209
+ margin: 10px 0 !important;
1210
+ width: 100% !important;
1211
+ }
1212
+
1213
+ /* Typography */
1214
+ h1 {
1215
+ font-size: max(24px, min(5vw, 32px)) !important;
1216
+ line-height: 1.2 !important;
1217
+ margin: 10px 0 !important;
1218
+ }
1219
+
1220
+ h2 {
1221
+ font-size: max(18px, min(4vw, 24px)) !important;
1222
+ line-height: 1.3 !important;
1223
+ }
1224
+
1225
+ p, span, div {
1226
+ font-size: max(14px, min(3.5vw, 16px)) !important;
1227
+ line-height: 1.4 !important;
1228
+ }
1229
+
1230
+ /* Specific Gradio component fixes */
1231
+ .gr-form {
1232
+ flex-direction: column !important;
1233
+ }
1234
+
1235
+ .gr-box {
1236
+ border-radius: 8px !important;
1237
+ margin: 8px 0 !important;
1238
+ }
1239
+
1240
+ .gr-panel {
1241
+ padding: 10px !important;
1242
+ }
1243
+
1244
+ /* Fix for overlapping elements */
1245
+ .fixed-height {
1246
+ height: auto !important;
1247
+ min-height: 0 !important;
1248
+ }
1249
+
1250
+ /* Better touch targets */
1251
+ .gr-button {
1252
+ padding: 12px 16px !important;
1253
+ margin: 4px !important;
1254
+ height: auto !important;
1255
+ }
1256
+
1257
+ /* Improve scrolling */
1258
+ .scroll-hide {
1259
+ -ms-overflow-style: none !important;
1260
+ scrollbar-width: none !important;
1261
+ }
1262
+
1263
+ .scroll-hide::-webkit-scrollbar {
1264
+ display: none !important;
1265
+ }
1266
+ }
1267
+
1268
+ /* Additional fixes for very small screens */
1269
+ @media screen and (max-width: 480px) {
1270
+ .gr-padded {
1271
+ padding: 8px !important;
1272
+ }
1273
+
1274
+ .gr-gap {
1275
+ gap: 8px !important;
1276
+ }
1277
+
1278
+ /* Ensure images don't overflow */
1279
+ img {
1280
+ max-width: 100% !important;
1281
+ height: auto !important;
1282
  }
1283
+ }
1284
 
1285
  """