Spaces:
Running
Running
fix iframe scroll
Browse files- static/s2f_styles.css +32 -3
static/s2f_styles.css
CHANGED
|
@@ -11,6 +11,26 @@ html, body, .stApp {
|
|
| 11 |
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
|
| 12 |
}
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
/* === Modern background patterns === */
|
| 15 |
.stApp {
|
| 16 |
background-color: #fafbfc !important;
|
|
@@ -106,6 +126,7 @@ section[data-testid="stSidebar"] {
|
|
| 106 |
max-height: 100vh !important;
|
| 107 |
overflow-x: hidden !important;
|
| 108 |
overflow-y: auto !important;
|
|
|
|
| 109 |
background:
|
| 110 |
linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%),
|
| 111 |
/* Subtle vertical rhythm */
|
|
@@ -121,7 +142,9 @@ section[data-testid="stSidebar"] {
|
|
| 121 |
@media (max-width: 768px) {
|
| 122 |
section[data-testid="stSidebar"] { width: 100% !important; max-width: 100% !important; }
|
| 123 |
[data-testid="stAppViewContainer"],
|
| 124 |
-
.appview-container .main {
|
|
|
|
|
|
|
| 125 |
}
|
| 126 |
section[data-testid="stSidebar"] [data-testid="stWidgetLabel"],
|
| 127 |
section[data-testid="stSidebar"] [data-testid="stWidgetLabel"] p {
|
|
@@ -528,13 +551,19 @@ hr { border-color: #cbd5e1 !important; opacity: 0.7; }
|
|
| 528 |
text-align: center;
|
| 529 |
line-height: 1.4;
|
| 530 |
}
|
| 531 |
-
/* Main content: offset for fixed sidebar
|
| 532 |
[data-testid="stAppViewContainer"],
|
| 533 |
.appview-container .main {
|
| 534 |
margin-left: 360px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 535 |
}
|
| 536 |
.block-container {
|
| 537 |
-
padding-bottom:
|
| 538 |
max-width: 1050px !important;
|
| 539 |
}
|
| 540 |
section[data-testid="stSidebar"] > div:first-child {
|
|
|
|
| 11 |
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
|
| 12 |
}
|
| 13 |
|
| 14 |
+
/* === Scroll lock for embedded (HF Spaces iframe): prevent parent scroll, main content scrolls internally === */
|
| 15 |
+
html, body {
|
| 16 |
+
height: 100% !important;
|
| 17 |
+
overflow: hidden !important;
|
| 18 |
+
margin: 0 !important;
|
| 19 |
+
}
|
| 20 |
+
.stApp {
|
| 21 |
+
height: 100vh !important;
|
| 22 |
+
overflow: hidden !important;
|
| 23 |
+
display: flex !important;
|
| 24 |
+
flex-direction: column !important;
|
| 25 |
+
}
|
| 26 |
+
/* Flex wrapper for sidebar + main */
|
| 27 |
+
.stApp > div {
|
| 28 |
+
display: flex !important;
|
| 29 |
+
flex: 1 !important;
|
| 30 |
+
min-height: 0 !important;
|
| 31 |
+
overflow: hidden !important;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
/* === Modern background patterns === */
|
| 35 |
.stApp {
|
| 36 |
background-color: #fafbfc !important;
|
|
|
|
| 126 |
max-height: 100vh !important;
|
| 127 |
overflow-x: hidden !important;
|
| 128 |
overflow-y: auto !important;
|
| 129 |
+
scrollbar-gutter: stable !important;
|
| 130 |
background:
|
| 131 |
linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%),
|
| 132 |
/* Subtle vertical rhythm */
|
|
|
|
| 142 |
@media (max-width: 768px) {
|
| 143 |
section[data-testid="stSidebar"] { width: 100% !important; max-width: 100% !important; }
|
| 144 |
[data-testid="stAppViewContainer"],
|
| 145 |
+
.appview-container .main {
|
| 146 |
+
margin-left: 0 !important;
|
| 147 |
+
}
|
| 148 |
}
|
| 149 |
section[data-testid="stSidebar"] [data-testid="stWidgetLabel"],
|
| 150 |
section[data-testid="stSidebar"] [data-testid="stWidgetLabel"] p {
|
|
|
|
| 551 |
text-align: center;
|
| 552 |
line-height: 1.4;
|
| 553 |
}
|
| 554 |
+
/* Main content: offset for fixed sidebar, scroll internally (fixes HF iframe embed) */
|
| 555 |
[data-testid="stAppViewContainer"],
|
| 556 |
.appview-container .main {
|
| 557 |
margin-left: 360px !important;
|
| 558 |
+
flex: 1 !important;
|
| 559 |
+
min-height: 0 !important;
|
| 560 |
+
overflow-y: auto !important;
|
| 561 |
+
overflow-x: hidden !important;
|
| 562 |
+
scrollbar-gutter: stable !important;
|
| 563 |
+
-webkit-overflow-scrolling: touch !important;
|
| 564 |
}
|
| 565 |
.block-container {
|
| 566 |
+
padding-bottom: 3rem !important;
|
| 567 |
max-width: 1050px !important;
|
| 568 |
}
|
| 569 |
section[data-testid="stSidebar"] > div:first-child {
|