Spaces:
Running
Running
Reset CSS to use default Streamlit styling for better accessibility
Browse files- app.py +4 -4
- ui/custom.css +8 -87
app.py
CHANGED
@@ -634,10 +634,10 @@ with main_tab2:
|
|
634 |
# Display previous results if available
|
635 |
if not st.session_state.previous_results:
|
636 |
st.markdown("""
|
637 |
-
<div class="previous-results-container
|
638 |
-
<div style="font-size: 48px; margin-bottom: 20px;
|
639 |
-
<h3 style="
|
640 |
-
<p style="
|
641 |
</div>
|
642 |
""", unsafe_allow_html=True)
|
643 |
else:
|
|
|
634 |
# Display previous results if available
|
635 |
if not st.session_state.previous_results:
|
636 |
st.markdown("""
|
637 |
+
<div class="previous-results-container" style="text-align: center; padding: 40px 20px; background-color: #f0f2f6; border-radius: 8px;">
|
638 |
+
<div style="font-size: 48px; margin-bottom: 20px;">π</div>
|
639 |
+
<h3 style="margin-bottom: 10px; font-weight: 600;">No Previous Results</h3>
|
640 |
+
<p style="font-size: 16px;">Process a document to see your results history saved here.</p>
|
641 |
</div>
|
642 |
""", unsafe_allow_html=True)
|
643 |
else:
|
ui/custom.css
CHANGED
@@ -15,45 +15,8 @@
|
|
15 |
background-color: #ffffff !important;
|
16 |
}
|
17 |
|
18 |
-
/*
|
19 |
-
|
20 |
-
.main .stMarkdown h1,
|
21 |
-
.main .stMarkdown h2,
|
22 |
-
.main .stMarkdown h3,
|
23 |
-
.main h1,
|
24 |
-
.main h2,
|
25 |
-
.main h3,
|
26 |
-
.main p,
|
27 |
-
.main li,
|
28 |
-
.main span,
|
29 |
-
.stMarkdown,
|
30 |
-
.css-10trblm,
|
31 |
-
.css-nahz7x,
|
32 |
-
.element-container p {
|
33 |
-
color: #ffffff !important;
|
34 |
-
text-shadow: none !important;
|
35 |
-
}
|
36 |
-
|
37 |
-
/* Exception for the No Previous Results section - make text black */
|
38 |
-
.no-previous-results h3,
|
39 |
-
.no-previous-results p,
|
40 |
-
.no-previous-results div,
|
41 |
-
.no-previous-results * {
|
42 |
-
color: #000000 !important;
|
43 |
-
text-shadow: none !important;
|
44 |
-
}
|
45 |
-
|
46 |
-
/* Fix About tab styling */
|
47 |
-
[data-testid="stVerticalBlock"] .stMarkdown h3 {
|
48 |
-
color: #ffffff !important;
|
49 |
-
font-weight: 600 !important;
|
50 |
-
margin-top: 1.5rem !important;
|
51 |
-
}
|
52 |
-
|
53 |
-
[data-testid="stVerticalBlock"] .stMarkdown p,
|
54 |
-
[data-testid="stVerticalBlock"] .stMarkdown li {
|
55 |
-
color: #ffffff !important;
|
56 |
-
}
|
57 |
|
58 |
.result-card {
|
59 |
border: 1px solid #e0e0e0;
|
@@ -192,46 +155,23 @@
|
|
192 |
/* Fix for fullscreen and expander buttons in image containers */
|
193 |
.stImage button[title="View fullscreen"] {
|
194 |
position: absolute !important;
|
195 |
-
top:
|
196 |
-
right:
|
197 |
z-index: 1000 !important;
|
198 |
visibility: visible !important;
|
199 |
opacity: 1 !important;
|
200 |
-
display: flex !important;
|
201 |
-
align-items: center !important;
|
202 |
-
justify-content: center !important;
|
203 |
-
background-color: rgba(0, 0, 0, 0.7) !important;
|
204 |
-
color: white !important;
|
205 |
-
width: 36px !important;
|
206 |
-
height: 36px !important;
|
207 |
-
border-radius: 4px !important;
|
208 |
}
|
209 |
|
210 |
/* Fix fullscreen button styling */
|
211 |
button[title="View fullscreen"],
|
212 |
button.streamlit-expanderHeader {
|
213 |
z-index: 999 !important;
|
214 |
-
background-color: rgba(0, 0, 0, 0.7) !important;
|
215 |
visibility: visible !important;
|
216 |
opacity: 1 !important;
|
217 |
-
display: flex !important;
|
218 |
-
align-items: center !important;
|
219 |
-
justify-content: center !important;
|
220 |
-
width: 36px !important;
|
221 |
-
height: 36px !important;
|
222 |
border-radius: 4px !important;
|
223 |
position: absolute !important;
|
224 |
-
top:
|
225 |
-
right:
|
226 |
-
border: 1px solid rgba(255, 255, 255, 0.3) !important;
|
227 |
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
|
228 |
-
color: white !important;
|
229 |
-
}
|
230 |
-
|
231 |
-
button[title="View fullscreen"]:hover,
|
232 |
-
button.streamlit-expanderHeader:hover {
|
233 |
-
background-color: rgba(0, 0, 0, 0.9) !important;
|
234 |
-
border: 1px solid rgba(255, 255, 255, 0.5) !important;
|
235 |
}
|
236 |
|
237 |
/* Make text visible in Previous Results tab - ensure high contrast */
|
@@ -244,28 +184,13 @@ button.streamlit-expanderHeader:hover {
|
|
244 |
text-shadow: none !important;
|
245 |
}
|
246 |
|
247 |
-
/* No Results
|
248 |
.previous-results-container[style*="text-align: center"] {
|
249 |
-
background-color: #
|
250 |
border-radius: 8px !important;
|
251 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
|
252 |
}
|
253 |
|
254 |
-
/* Force the "No Previous Results" text to be black regardless of parent styling */
|
255 |
-
div[style*="background-color: #f8f9fa"] h3 {
|
256 |
-
color: #000000 !important;
|
257 |
-
font-weight: 600 !important;
|
258 |
-
}
|
259 |
-
|
260 |
-
div[style*="background-color: #f8f9fa"] p {
|
261 |
-
color: #000000 !important;
|
262 |
-
font-size: 16px !important;
|
263 |
-
}
|
264 |
-
|
265 |
-
div[style*="background-color: #f8f9fa"] * {
|
266 |
-
color: #000000 !important;
|
267 |
-
}
|
268 |
-
|
269 |
/* Additional image fixes for all containers */
|
270 |
.document-content img,
|
271 |
.markdown-text-container img,
|
@@ -369,12 +294,8 @@ div[style*="background-color: #f8f9fa"] * {
|
|
369 |
[data-testid="caption"],
|
370 |
.css-1b0udgb,
|
371 |
.css-183lzff {
|
372 |
-
background-color: rgba(255, 255, 255, 0.9) !important;
|
373 |
margin-top: 5px !important;
|
374 |
-
color: #000000 !important;
|
375 |
font-weight: 500 !important;
|
376 |
text-align: center !important;
|
377 |
font-size: 0.9rem !important;
|
378 |
-
width: 100% !important;
|
379 |
-
display: block !important;
|
380 |
}
|
|
|
15 |
background-color: #ffffff !important;
|
16 |
}
|
17 |
|
18 |
+
/* Let Streamlit handle text colors based on background */
|
19 |
+
/* Reset forced white text to use Streamlit defaults */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
.result-card {
|
22 |
border: 1px solid #e0e0e0;
|
|
|
155 |
/* Fix for fullscreen and expander buttons in image containers */
|
156 |
.stImage button[title="View fullscreen"] {
|
157 |
position: absolute !important;
|
158 |
+
top: 5px !important;
|
159 |
+
right: 5px !important;
|
160 |
z-index: 1000 !important;
|
161 |
visibility: visible !important;
|
162 |
opacity: 1 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
|
165 |
/* Fix fullscreen button styling */
|
166 |
button[title="View fullscreen"],
|
167 |
button.streamlit-expanderHeader {
|
168 |
z-index: 999 !important;
|
|
|
169 |
visibility: visible !important;
|
170 |
opacity: 1 !important;
|
|
|
|
|
|
|
|
|
|
|
171 |
border-radius: 4px !important;
|
172 |
position: absolute !important;
|
173 |
+
top: 5px !important;
|
174 |
+
right: 5px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
}
|
176 |
|
177 |
/* Make text visible in Previous Results tab - ensure high contrast */
|
|
|
184 |
text-shadow: none !important;
|
185 |
}
|
186 |
|
187 |
+
/* No Results styling with proper contrast */
|
188 |
.previous-results-container[style*="text-align: center"] {
|
189 |
+
background-color: #f0f2f6 !important;
|
190 |
border-radius: 8px !important;
|
191 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
|
192 |
}
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
/* Additional image fixes for all containers */
|
195 |
.document-content img,
|
196 |
.markdown-text-container img,
|
|
|
294 |
[data-testid="caption"],
|
295 |
.css-1b0udgb,
|
296 |
.css-183lzff {
|
|
|
297 |
margin-top: 5px !important;
|
|
|
298 |
font-weight: 500 !important;
|
299 |
text-align: center !important;
|
300 |
font-size: 0.9rem !important;
|
|
|
|
|
301 |
}
|