fix(ui): the 随缘版 tag stays in the corner of the active sidebar tile (BUG-2256)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1
This commit is contained in:
@@ -8747,4 +8747,6 @@ button.report-ask-excerpt-toggle { height: 32px; padding: 0; color: var(--color-
|
||||
top-right corner of the sidebar tile. */
|
||||
.secondary-header-tag { flex: none; padding: 3px 7px; border-radius: 999px; background: var(--color-canvas-muted); color: var(--color-ink-secondary); font-size: 12px; font-weight: 400; line-height: 1.2; white-space: nowrap; }
|
||||
.sidebar-nav-link:has(.sidebar-nav-tag) { position: relative; }
|
||||
/* The active tile lifts its children with position: relative (.sidebar-nav-link[data-active] > :not(...)); the tag stays in the corner. */
|
||||
.sidebar-nav-link > .sidebar-nav-tag, .sidebar-nav-link[data-active="true"] > .sidebar-nav-tag { position: absolute; z-index: 2; }
|
||||
.sidebar-nav-tag { position: absolute; top: 4px; right: 4px; padding: 2px 5px; border-radius: 999px; background: var(--sidebar-solid, var(--color-canvas)); color: var(--color-ink-secondary); font-size: 10px; line-height: 1.2; white-space: nowrap; pointer-events: none; }
|
||||
|
||||
@@ -17,6 +17,8 @@ test("生时纠正 says 随缘版 beside its title and on its sidebar tile", ()
|
||||
const css = read("../src/app/globals.css");
|
||||
assert.match(css, /\.secondary-header-tag \{/);
|
||||
assert.match(css, /\.sidebar-nav-tag \{/);
|
||||
// The active tile (on 生时纠正 itself) must not pull the tag back into the flow.
|
||||
assert.match(css, /\.sidebar-nav-link\[data-active="true"\] > \.sidebar-nav-tag \{ position: absolute; z-index: 2; \}/);
|
||||
});
|
||||
|
||||
test("the home no longer says the report opens by naming your own choice", () => {
|
||||
|
||||
Reference in New Issue
Block a user