Skip to content

World's first open-source enterprise world model.

The tab row: a thinner line, a fainter glow, a step closer to the edge (#424)

WaylandYang33e12d9719ac
diff --git a/web/src/pages/Shell.tsx b/web/src/pages/Shell.tsx
index b82de322..e9c6f0e3 100644
--- a/web/src/pages/Shell.tsx
+++ b/web/src/pages/Shell.tsx
@@ -117,7 +117,9 @@ export function Shell() {
</header>
{/* Tab 导航条:图标 + 文字,激活态下划线(Vercel 式) */}
- <nav className="glass-strong border-x-0 border-t-0 shrink-0 flex items-stretch gap-1 px-4">
+ {/* px-2:第一个标签的图标离左缘 24,比字标(32)再靠边一点——标签自带
+ 16px 内距,与字标同缩进时整行看着比字标还往里 */}
+ <nav className="glass-strong border-x-0 border-t-0 shrink-0 flex items-stretch gap-1 px-2">
{TABS.map(({ to, label, Icon }) => (
<Link
key={to}
diff --git a/web/src/styles.css b/web/src/styles.css
index 99cb8a5f..dde3e094 100644
--- a/web/src/styles.css
+++ b/web/src/styles.css
@@ -756,7 +756,8 @@ select.input-dark option {
line-height: var(--text-body--line-height);
font-weight: 500;
color: var(--u-text-2);
- border-bottom: 2px solid transparent;
+ /* 1px 的线:光晕已经在说「这一页」,线只用点到为止 */
+ border-bottom: 1px solid transparent;
transition: color var(--u-fast);
}
.u-tab:hover {
@@ -766,7 +767,7 @@ select.input-dark option {
color: var(--u-text);
border-bottom-color: #ffffff;
}
-/* 选中的那一页从下划线往上透一点光:白 10% 在底,到六成高处就没了——说的是
+/* 选中的那一页从下划线往上透一点光:白 6% 在底,到一半高处就没了——说的是
「光从线上来」,不是给标签涂一块底。压在文字后面,不接指针 */
.u-tab.is-active::before {
content: "";
@@ -775,8 +776,8 @@ select.input-dark option {
z-index: -1;
background: linear-gradient(
to top,
- rgba(255, 255, 255, 0.1),
- rgba(255, 255, 255, 0) 60%
+ rgba(255, 255, 255, 0.06),
+ rgba(255, 255, 255, 0) 50%
);
pointer-events: none;
}