LovnishVerma commited on
Commit
ab591c2
·
verified ·
1 Parent(s): e936087

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -40
app.py CHANGED
@@ -22,71 +22,48 @@ st.markdown("""
22
  <style>
23
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');
24
 
25
- [data-testid="stDataFrame"],
26
- [data-testid="stDataFrame"] * { background: #0f172a !important; color: #ffffff !important; border: none !important; }
27
- [data-testid="stDataFrame"] table, [data-testid="stDataFrame"] th, [data-testid="stDataFrame"] td, [data-testid="stDataFrame"] tr, [data-testid="stDataFrame"] thead, [data-testid="stDataFrame"] tbody { background: #0f172a !important; color: #ffffff !important; font-weight: 700 !important; }
28
- [data-testid="stDataFrame"] th { background: rgba(30, 41, 59, 0.95) !important; color: #ffffff !important; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 800 !important; }
29
- [data-testid="stDataFrame"] [data-testid="stTableIndex"] { color: #e2e8f0 !important; font-weight: 800 !important; }
30
- .styled-dataframe, .dataframe, table { background: #0f172a !important; }
31
-
32
- .css-1d391kg, .css-1y0tuds,
33
- [data-testid="stVerticalBlock"] > div:first-child,
34
- .block-container, .main > div,
35
- [data-testid="stAppViewContainer"] > div:first-child {
36
- padding-top: 1rem !important;
37
- margin-top: 0 !important;
38
- }
39
-
40
-
41
  [data-testid="stDataFrame"] {
42
  background: #0f172a !important;
43
  border-radius: 20px !important;
44
  border: 1px solid rgba(255,255,255,0.12) !important;
45
  overflow: hidden;
 
46
  }
47
 
 
 
 
 
 
48
 
49
- [data-testid="stDataFrame"] table,
50
- [data-testid="stDataFrame"] thead,
51
- [data-testid="stDataFrame"] tbody,
52
- [data-testid="stDataFrame"] tr,
53
  [data-testid="stDataFrame"] th,
54
- [data-testid="stDataFrame"] td {
55
- background: #0f172a !important;
 
56
  color: #ffffff !important;
57
  font-weight: 700 !important;
58
- border: none !important;
59
- text-shadow: 0 1px 4px rgba(0,0,0,0.8) !important;
60
  }
61
 
62
-
63
  [data-testid="stDataFrame"] th {
64
- background: rgba(30, 41, 59, 0.9) !important;
65
  color: #ffffff !important;
66
- font-weight: 800 !important;
67
  text-transform: uppercase;
68
  letter-spacing: 0.5px;
 
69
  }
70
 
71
-
72
  [data-testid="stDataFrame"] [data-testid="stTableIndex"] {
73
  color: #e2e8f0 !important;
74
  font-weight: 800 !important;
75
  }
76
 
77
-
78
- .css-1offfwp, .css-1d391kg, table, td, th {
79
- background: #0f172a !important;
80
- color: #ffffff !important;
81
  }
82
-
83
-
84
- .css-1cpxna2, .css-1kyxreq, .css-1d391kg p,
85
- div[data-testid="caption"], p {
86
- color: #ffffff !important;
87
- font-weight: 700 !important;
88
- text-shadow: 0 2px 10px rgba(0,0,0,0.7) !important;
89
- }
90
 
91
  :root {
92
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
 
22
  <style>
23
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');
24
 
25
+ /* FINAL & 100% WORKING DATAFRAME FIX — DARK + WHITE TEXT + NEVER DISAPPEARS */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  [data-testid="stDataFrame"] {
27
  background: #0f172a !important;
28
  border-radius: 20px !important;
29
  border: 1px solid rgba(255,255,255,0.12) !important;
30
  overflow: hidden;
31
+ box-shadow: 0 8px 32px rgba(0,0,0,0.3);
32
  }
33
 
34
+ [data-testid="stDataFrame"] table {
35
+ background: #0f172a !important;
36
+ color: #ffffff !important;
37
+ width: 100% !important;
38
+ }
39
 
 
 
 
 
40
  [data-testid="stDataFrame"] th,
41
+ [data-testid="stDataFrame"] td,
42
+ [data-testid="stDataFrame"] tr {
43
+ background: transparent !important;
44
  color: #ffffff !important;
45
  font-weight: 700 !important;
46
+ border: 1px solid rgba(255,255,255,0.08) !important;
47
+ padding: 12px 16px !important;
48
  }
49
 
 
50
  [data-testid="stDataFrame"] th {
51
+ background: rgba(30, 41, 59, 0.95) !important;
52
  color: #ffffff !important;
 
53
  text-transform: uppercase;
54
  letter-spacing: 0.5px;
55
+ font-weight: 800 !important;
56
  }
57
 
 
58
  [data-testid="stDataFrame"] [data-testid="stTableIndex"] {
59
  color: #e2e8f0 !important;
60
  font-weight: 800 !important;
61
  }
62
 
63
+ /* Kill any pandas background gradient interference */
64
+ .styled-dataframe * {
65
+ background: transparent !important;
 
66
  }
 
 
 
 
 
 
 
 
67
 
68
  :root {
69
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);