Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +26 -34
src/streamlit_app.py
CHANGED
|
@@ -84,52 +84,44 @@ st.markdown("""
|
|
| 84 |
box-shadow: 0 0 5px rgba(255, 75, 75, 0.5) !important;
|
| 85 |
}
|
| 86 |
|
| 87 |
-
/*
|
| 88 |
-
.
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
padding: 8px;
|
| 93 |
-
border: 1px solid #e6e6e6;
|
| 94 |
-
border-radius: 6px;
|
| 95 |
-
background: #ffffff;
|
| 96 |
}
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
| 101 |
}
|
| 102 |
|
| 103 |
-
/*
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
position: relative !important;
|
| 113 |
}
|
| 114 |
|
| 115 |
-
/*
|
| 116 |
div[data-testid="column"] img,
|
| 117 |
div[data-testid="column"] canvas {
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
}
|
| 122 |
|
| 123 |
-
/*
|
| 124 |
div[data-testid="column"]::-webkit-scrollbar { width: 10px; height: 10px; }
|
| 125 |
div[data-testid="column"]::-webkit-scrollbar-thumb { border-radius: 8px; background-color: rgba(0,0,0,0.12); }
|
| 126 |
div[data-testid="column"]::-webkit-scrollbar-track { background: transparent; }
|
| 127 |
-
|
| 128 |
-
/* IMPORTANT: remove any rule that forcibly hides page scrollbars.
|
| 129 |
-
If you previously set overflow: hidden on the main container it prevents children from scrolling properly.
|
| 130 |
-
DO NOT set `overflow: hidden` on the top-level app container.
|
| 131 |
-
*/
|
| 132 |
-
/* removed: [data-testid="stAppViewContainer"] > .main { overflow: hidden !important; height: 100vh !important; } */
|
| 133 |
</style>
|
| 134 |
|
| 135 |
""", unsafe_allow_html=True)
|
|
|
|
| 84 |
box-shadow: 0 0 5px rgba(255, 75, 75, 0.5) !important;
|
| 85 |
}
|
| 86 |
|
| 87 |
+
/* Make sure the top-level containers allow children to create scroll contexts */
|
| 88 |
+
html, body, #root, #root>div, [data-testid="stAppViewContainer"], .block-container, .css-1lcbmhc, .main {
|
| 89 |
+
overflow: visible !important;
|
| 90 |
+
height: auto !important;
|
| 91 |
+
min-height: 100vh !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
+
|
| 94 |
+
/* Force the Streamlit app column elements to be scrollable */
|
| 95 |
+
div[data-testid="column"], .stColumns, .stContainer {
|
| 96 |
+
max-height: calc(100vh - 160px) !important;
|
| 97 |
+
overflow-y: auto !important;
|
| 98 |
+
overflow-x: hidden !important;
|
| 99 |
+
position: relative !important;
|
| 100 |
}
|
| 101 |
|
| 102 |
+
/* small helper scroll classes (if you wrap with these) */
|
| 103 |
+
.left-scroll, .right-scroll {
|
| 104 |
+
max-height: calc(100vh - 160px);
|
| 105 |
+
overflow-y: auto;
|
| 106 |
+
overflow-x: auto;
|
| 107 |
+
padding: 8px;
|
| 108 |
+
border: 1px solid #e6e6e6;
|
| 109 |
+
border-radius: 6px;
|
| 110 |
+
background: #ffffff;
|
|
|
|
| 111 |
}
|
| 112 |
|
| 113 |
+
/* make canvas/images not expand the column */
|
| 114 |
div[data-testid="column"] img,
|
| 115 |
div[data-testid="column"] canvas {
|
| 116 |
+
max-width: 100% !important;
|
| 117 |
+
height: auto !important;
|
| 118 |
+
display: block !important;
|
| 119 |
}
|
| 120 |
|
| 121 |
+
/* subtle WebKit scrollbar */
|
| 122 |
div[data-testid="column"]::-webkit-scrollbar { width: 10px; height: 10px; }
|
| 123 |
div[data-testid="column"]::-webkit-scrollbar-thumb { border-radius: 8px; background-color: rgba(0,0,0,0.12); }
|
| 124 |
div[data-testid="column"]::-webkit-scrollbar-track { background: transparent; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
</style>
|
| 126 |
|
| 127 |
""", unsafe_allow_html=True)
|