Spaces:
Sleeping
Sleeping
Update web/src/styles/globals.css
Browse files- web/src/styles/globals.css +22 -63
web/src/styles/globals.css
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
/* web/src/styles/globals.css */
|
| 2 |
-
|
| 3 |
@custom-variant dark (&:is(.dark *));
|
| 4 |
|
| 5 |
:root {
|
|
@@ -136,7 +134,7 @@
|
|
| 136 |
@apply bg-background text-foreground;
|
| 137 |
-webkit-font-smoothing: antialiased;
|
| 138 |
-moz-osx-font-smoothing: grayscale;
|
| 139 |
-
overflow: hidden; /*
|
| 140 |
}
|
| 141 |
}
|
| 142 |
|
|
@@ -144,7 +142,7 @@
|
|
| 144 |
* Base typography. This is not applied to elements which have an ancestor with a Tailwind text class.
|
| 145 |
*/
|
| 146 |
@layer base {
|
| 147 |
-
:where(:not(:has([class*=
|
| 148 |
h1 {
|
| 149 |
font-size: var(--text-2xl);
|
| 150 |
font-weight: var(--font-weight-medium);
|
|
@@ -193,90 +191,51 @@ html {
|
|
| 193 |
font-size: var(--font-size);
|
| 194 |
}
|
| 195 |
|
| 196 |
-
/* ============================
|
| 197 |
-
|
| 198 |
-
============================
|
| 199 |
-
|
| 200 |
-
/* 1) 三列/整体布局骨架:父容器必须 min-height:0 才能允许子元素滚动 */
|
| 201 |
-
.appShell {
|
| 202 |
-
height: 100vh;
|
| 203 |
-
overflow: hidden;
|
| 204 |
-
display: flex;
|
| 205 |
-
min-height: 0;
|
| 206 |
-
}
|
| 207 |
-
|
| 208 |
-
/* 每列容器:自身不滚,只允许内部滚动容器滚 */
|
| 209 |
-
.col {
|
| 210 |
-
height: 100%;
|
| 211 |
-
min-height: 0;
|
| 212 |
-
overflow: hidden;
|
| 213 |
-
display: flex;
|
| 214 |
-
flex-direction: column;
|
| 215 |
-
}
|
| 216 |
|
| 217 |
-
/*
|
| 218 |
-
.
|
| 219 |
-
flex: 0 0 auto;
|
| 220 |
-
}
|
| 221 |
-
|
| 222 |
-
/* 弹性区:通常里面放 panelScroll/chatScroll */
|
| 223 |
-
.colFlex {
|
| 224 |
-
flex: 1 1 auto;
|
| 225 |
min-height: 0;
|
| 226 |
-
overflow: hidden;
|
| 227 |
}
|
| 228 |
|
| 229 |
-
/*
|
| 230 |
.panelScroll {
|
| 231 |
overflow-y: auto;
|
| 232 |
overflow-x: hidden;
|
| 233 |
min-height: 0;
|
| 234 |
padding-right: 10px;
|
| 235 |
|
| 236 |
-
/*
|
| 237 |
-
overscroll-behavior: contain;
|
| 238 |
-
|
| 239 |
-
/* iOS/移动端更顺 */
|
| 240 |
-webkit-overflow-scrolling: touch;
|
| 241 |
-
}
|
| 242 |
-
|
| 243 |
-
/* 3) Chat 消息区专用滚动容器(建议只让它滚) */
|
| 244 |
-
.chatScroll {
|
| 245 |
-
overflow-y: auto;
|
| 246 |
-
overflow-x: hidden;
|
| 247 |
-
min-height: 0;
|
| 248 |
|
|
|
|
| 249 |
overscroll-behavior: contain;
|
| 250 |
-
|
|
|
|
|
|
|
|
|
|
| 251 |
}
|
| 252 |
|
| 253 |
-
|
| 254 |
-
.panelScroll::-webkit-scrollbar,
|
| 255 |
-
.chatScroll::-webkit-scrollbar {
|
| 256 |
width: 10px;
|
| 257 |
}
|
| 258 |
|
| 259 |
-
.panelScroll::-webkit-scrollbar-thumb
|
| 260 |
-
.chatScroll::-webkit-scrollbar-thumb {
|
| 261 |
background: rgba(0, 0, 0, 0.18);
|
| 262 |
border-radius: 999px;
|
| 263 |
-
border: 2px solid transparent;
|
| 264 |
-
background-clip: padding-box;
|
| 265 |
}
|
| 266 |
|
| 267 |
-
.panelScroll::-webkit-scrollbar-track
|
| 268 |
-
.chatScroll::-webkit-scrollbar-track {
|
| 269 |
background: transparent;
|
| 270 |
}
|
| 271 |
|
| 272 |
-
/*
|
| 273 |
-
.panelScroll
|
| 274 |
-
.
|
| 275 |
-
scrollbar-width: thin;
|
| 276 |
-
scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
|
| 277 |
}
|
| 278 |
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
overflow: hidden !important;
|
| 282 |
}
|
|
|
|
|
|
|
|
|
|
| 1 |
@custom-variant dark (&:is(.dark *));
|
| 2 |
|
| 3 |
:root {
|
|
|
|
| 134 |
@apply bg-background text-foreground;
|
| 135 |
-webkit-font-smoothing: antialiased;
|
| 136 |
-moz-osx-font-smoothing: grayscale;
|
| 137 |
+
overflow: hidden; /* 你这里锁页面滚动没问题:让内部面板各自滚 */
|
| 138 |
}
|
| 139 |
}
|
| 140 |
|
|
|
|
| 142 |
* Base typography. This is not applied to elements which have an ancestor with a Tailwind text class.
|
| 143 |
*/
|
| 144 |
@layer base {
|
| 145 |
+
:where(:not(:has([class*=' text-']), :not(:has([class^='text-'])))) {
|
| 146 |
h1 {
|
| 147 |
font-size: var(--text-2xl);
|
| 148 |
font-weight: var(--font-weight-medium);
|
|
|
|
| 191 |
font-size: var(--font-size);
|
| 192 |
}
|
| 193 |
|
| 194 |
+
/* ============================
|
| 195 |
+
Scroll / Layout hardening
|
| 196 |
+
============================ */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
|
| 198 |
+
/* 关键:让任何 flex 子项允许变矮,否则 overflow 不生效 */
|
| 199 |
+
.min-h-0 {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
min-height: 0;
|
|
|
|
| 201 |
}
|
| 202 |
|
| 203 |
+
/* 你想要的统一滚动容器:可滚动 + 不联动外层 + 有滚动条 */
|
| 204 |
.panelScroll {
|
| 205 |
overflow-y: auto;
|
| 206 |
overflow-x: hidden;
|
| 207 |
min-height: 0;
|
| 208 |
padding-right: 10px;
|
| 209 |
|
| 210 |
+
/* iOS/trackpad smoother */
|
|
|
|
|
|
|
|
|
|
| 211 |
-webkit-overflow-scrolling: touch;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
|
| 213 |
+
/* 阻断 scroll chaining(非常关键) */
|
| 214 |
overscroll-behavior: contain;
|
| 215 |
+
|
| 216 |
+
/* Firefox scrollbar */
|
| 217 |
+
scrollbar-width: thin;
|
| 218 |
+
scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
|
| 219 |
}
|
| 220 |
|
| 221 |
+
.panelScroll::-webkit-scrollbar {
|
|
|
|
|
|
|
| 222 |
width: 10px;
|
| 223 |
}
|
| 224 |
|
| 225 |
+
.panelScroll::-webkit-scrollbar-thumb {
|
|
|
|
| 226 |
background: rgba(0, 0, 0, 0.18);
|
| 227 |
border-radius: 999px;
|
|
|
|
|
|
|
| 228 |
}
|
| 229 |
|
| 230 |
+
.panelScroll::-webkit-scrollbar-track {
|
|
|
|
| 231 |
background: transparent;
|
| 232 |
}
|
| 233 |
|
| 234 |
+
/* dark 下的滚动条稍亮一点 */
|
| 235 |
+
.dark .panelScroll {
|
| 236 |
+
scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
|
|
|
|
|
|
|
| 237 |
}
|
| 238 |
|
| 239 |
+
.dark .panelScroll::-webkit-scrollbar-thumb {
|
| 240 |
+
background: rgba(255, 255, 255, 0.22);
|
|
|
|
| 241 |
}
|