Spaces:
Running
Running
Fix easter egg button visibility — scoped CSS, larger emoji, removed broken fixed position
Browse files
app.py
CHANGED
|
@@ -222,23 +222,20 @@ def log_prediction(text, result):
|
|
| 222 |
|
| 223 |
st.markdown("""
|
| 224 |
<style>
|
| 225 |
-
div[data-testid="stPopover"] {
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
z-index: 9999;
|
| 230 |
-
}
|
| 231 |
-
div[data-testid="stPopover"] button {
|
| 232 |
-
opacity: 0.22;
|
| 233 |
-
transition: opacity 0.25s ease;
|
| 234 |
-
font-size: 22px;
|
| 235 |
-
color: #aaa;
|
| 236 |
-
border: none;
|
| 237 |
background: transparent;
|
| 238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
}
|
| 240 |
-
div[data-testid="stPopover"] button
|
| 241 |
-
|
| 242 |
}
|
| 243 |
</style>
|
| 244 |
""", unsafe_allow_html=True)
|
|
@@ -255,8 +252,10 @@ with title_col:
|
|
| 255 |
st.caption("Dual BERTweet model · type a social media post to classify it.")
|
| 256 |
|
| 257 |
with egg_col:
|
|
|
|
| 258 |
with st.popover("🔬"):
|
| 259 |
st.markdown(ABOUT_MD)
|
|
|
|
| 260 |
|
| 261 |
|
| 262 |
# ─────────────────────────────────────────────────────────────────────
|
|
|
|
| 222 |
|
| 223 |
st.markdown("""
|
| 224 |
<style>
|
| 225 |
+
.easter-egg-col div[data-testid="stPopover"] button {
|
| 226 |
+
opacity: 0.15;
|
| 227 |
+
transition: opacity 0.3s ease;
|
| 228 |
+
font-size: 28px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
background: transparent;
|
| 230 |
+
border: none;
|
| 231 |
+
padding: 0;
|
| 232 |
+
line-height: 1;
|
| 233 |
+
}
|
| 234 |
+
.easter-egg-col div[data-testid="stPopover"] button:hover {
|
| 235 |
+
opacity: 0.85;
|
| 236 |
}
|
| 237 |
+
.easter-egg-col div[data-testid="stPopover"] button p {
|
| 238 |
+
font-size: 28px !important;
|
| 239 |
}
|
| 240 |
</style>
|
| 241 |
""", unsafe_allow_html=True)
|
|
|
|
| 252 |
st.caption("Dual BERTweet model · type a social media post to classify it.")
|
| 253 |
|
| 254 |
with egg_col:
|
| 255 |
+
st.markdown('<div class="easter-egg-col">', unsafe_allow_html=True)
|
| 256 |
with st.popover("🔬"):
|
| 257 |
st.markdown(ABOUT_MD)
|
| 258 |
+
st.markdown('</div>', unsafe_allow_html=True)
|
| 259 |
|
| 260 |
|
| 261 |
# ─────────────────────────────────────────────────────────────────────
|