ahmadsanafarooq commited on
Commit
dae4257
·
verified ·
1 Parent(s): de6f556

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +59 -10
app.py CHANGED
@@ -1244,22 +1244,57 @@ def show_main_app():
1244
  .stSelectbox>div>div>div {
1245
  border-radius: 10px;
1246
  border: 1px solid #ced4da;
1247
- padding: 12px 15px; /* More padding */
1248
  font-size: 1.05em;
1249
- color: #343a40;
1250
  background-color: #fcfcfc;
1251
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.03);
 
 
 
 
1252
  }
1253
  .stSelectbox>label {
1254
  font-weight: 600;
1255
  color: #495057;
1256
  margin-bottom: 0.6rem;
1257
  }
1258
- /* FIX: Selectbox selected value text color */
1259
  .stSelectbox>div>div>div>input[type="text"] {
1260
- color: black !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1261
  }
1262
 
 
1263
  /* File Uploader */
1264
  [data-testid="stFileUploaderDropzone"] {
1265
  border-radius: 12px; /* More rounded */
@@ -1268,23 +1303,37 @@ def show_main_app():
1268
  padding: 25px; /* More padding */
1269
  transition: border-color 0.3s ease, background-color 0.3s ease;
1270
  margin-bottom: 1.5rem;
 
 
 
 
 
 
1271
  }
1272
  [data-testid="stFileUploaderDropzone"]:hover {
1273
  border-color: #5d6dbe; /* Highlight on hover */
1274
  background-color: #f7f9fb;
1275
  }
1276
- /* FIX: "Drag and drop file here" text color */
1277
- [data-testid="stFileUploaderDropzone"] span { /* Targeting span within dropzone */
1278
- color: black !important;
 
 
 
 
 
1279
  }
1280
 
1281
- /* Hide the redundant 'Drag and drop file here' text (your existing rule) */
1282
- /* This rule often hides the entire paragraph, so if you want to show
1283
- "Drag and drop file here" in black, you might need to remove this rule */
 
 
1284
  /* [data-testid="stFileUploaderDropzone"] p:first-child {
1285
  display: none;
1286
  } */
1287
 
 
1288
  [data-testid="stFileUploaderFileName"] {
1289
  font-size: 0.95em;
1290
  color: #495057;
 
1244
  .stSelectbox>div>div>div {
1245
  border-radius: 10px;
1246
  border: 1px solid #ced4da;
1247
+ padding: 0px 15px; /* Adjust padding significantly to let content control height */
1248
  font-size: 1.05em;
 
1249
  background-color: #fcfcfc;
1250
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.03);
1251
+ overflow: hidden; /* Prevent text from escaping if it gets too big */
1252
+ display: flex; /* Use flexbox for vertical alignment */
1253
+ align-items: center; /* Vertically center content */
1254
+ min-height: 48px; /* Ensure a minimum height for the selectbox */
1255
  }
1256
  .stSelectbox>label {
1257
  font-weight: 600;
1258
  color: #495057;
1259
  margin-bottom: 0.6rem;
1260
  }
1261
+ /* FIX: Selectbox selected value text color and ensure it fits properly */
1262
  .stSelectbox>div>div>div>input[type="text"] {
1263
+ color: black !important; /* Ensure the text is black */
1264
+ flex-grow: 1; /* Allow the input to take available space */
1265
+ min-height: 1.2em; /* Ensure text line has proper height */
1266
+ line-height: 1.2em; /* Match line height to font size */
1267
+ padding: 12px 0px; /* Add vertical padding directly to the input */
1268
+ vertical-align: middle; /* Helps align text vertically */
1269
+ background-color: transparent; /* Ensure input background is transparent */
1270
+ border: none; /* Remove default input border */
1271
+ outline: none; /* Remove outline on focus */
1272
+ }
1273
+
1274
+ /* FIX: Dropdown arrow color and visibility */
1275
+ /* Target the button containing the SVG icon for the dropdown */
1276
+ [data-testid="stSelectbox"] button {
1277
+ background-color: transparent !important; /* Ensure button background is transparent */
1278
+ color: black !important; /* Fallback for any text in button */
1279
+ border: none !important; /* Remove button border */
1280
+ padding: 0 5px; /* Adjust padding around the arrow */
1281
+ margin-left: auto; /* Push the arrow to the right */
1282
+ display: flex; /* Use flex for centering if icon is inside */
1283
+ align-items: center; /* Vertically center the icon */
1284
+ cursor: pointer;
1285
+ }
1286
+ /* Target the SVG icon itself */
1287
+ [data-testid="stSelectbox"] svg {
1288
+ fill: black !important; /* Force the SVG icon to be black */
1289
+ color: black !important; /* Fallback for some SVG types */
1290
+ font-size: 1.2em; /* Adjust size if needed */
1291
+ }
1292
+ /* Specific path inside SVG might also need fill */
1293
+ [data-testid="stSelectbox"] svg path {
1294
+ fill: black !important;
1295
  }
1296
 
1297
+
1298
  /* File Uploader */
1299
  [data-testid="stFileUploaderDropzone"] {
1300
  border-radius: 12px; /* More rounded */
 
1303
  padding: 25px; /* More padding */
1304
  transition: border-color 0.3s ease, background-color 0.3s ease;
1305
  margin-bottom: 1.5rem;
1306
+ display: flex; /* Use flexbox to better control content layout */
1307
+ flex-direction: column; /* Stack children vertically */
1308
+ justify-content: center; /* Center content vertically */
1309
+ align-items: center; /* Center content horizontally */
1310
+ text-align: center; /* Ensure text alignment */
1311
+ min-height: 120px; /* Ensure enough height for the dropzone */
1312
  }
1313
  [data-testid="stFileUploaderDropzone"]:hover {
1314
  border-color: #5d6dbe; /* Highlight on hover */
1315
  background-color: #f7f9fb;
1316
  }
1317
+ /* FIX: "Drag and drop file here" text color and visibility */
1318
+ /* Target all common text elements within the dropzone and force black color */
1319
+ [data-testid="stFileUploaderDropzone"] p,
1320
+ [data-testid="stFileUploaderDropzone"] span,
1321
+ [data-testid="stFileUploaderDropzone"] div { /* Target all divs too, more aggressive */
1322
+ color: black !important; /* Force text to be black */
1323
+ white-space: normal; /* Allow text to wrap if it's long */
1324
+ word-break: break-word; /* Break long words to prevent horizontal overflow */
1325
  }
1326
 
1327
+ /* IMPORTANT: This rule hides the default "Drag and drop file here" text.
1328
+ If you want that text to be visible (and black), you MUST REMOVE or COMMENT OUT this entire block.
1329
+ Based on your previous request "when i highlight it it's visible otherwise not",
1330
+ you want it visible, so I'm commenting it out.
1331
+ */
1332
  /* [data-testid="stFileUploaderDropzone"] p:first-child {
1333
  display: none;
1334
  } */
1335
 
1336
+
1337
  [data-testid="stFileUploaderFileName"] {
1338
  font-size: 0.95em;
1339
  color: #495057;