Files
kate522andClaude Opus 5 ba32e0ef9c fix(nav): match the theme toggle icon size and baseline to its neighbours
Measured in the live header: the toggle's glyph was 15.25px tall centred at
y=31.5, while the account and search icons are 14px tall centred at y=34.09.
Two causes stack up:

- `.toggle-radius` is a fixed 29x29 circle with no font-size, so the sun/moon
  pseudo-elements inherit `.navbar-top`'s 15px. The sibling `.jio-nav-icon`
  buttons pin 14px, so the toggle glyph renders a size larger.
- The toggle sits alone in a 29px `.navbar-form`, while the account cluster is
  34px (6px padding + 20px line box + 6px). Both clusters are top-aligned, so
  their centres differ by 2.5px.

Pin the toggle's glyph to 14px and give its cluster the same 34px flex line as
its neighbours. Scoped to `.navbar-top`, so the mobile drawer and the floating
rail (which also carry .toggle-theme) keep their own geometry.

Verified via headless Edge + CDP on https://localhost: glyph now 14px, centre
delta 0.09px (was 2.5px); pixel measurement shows the sun at 14.0px against
14.0px for the search icon.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-11-03 21:36:56 +08:00

133 lines
4.0 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Header account popover.
*
* The shared navigation rules own the layout. Restore the reference typography
* and action controls where the public reset differs from Bootstrap 3.
*/
.header,
.mobile-header,
.navbar-search {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
-webkit-font-smoothing: auto;
-moz-osx-font-smoothing: auto;
text-rendering: auto;
}
/* Keep the logo inline so the centered mobile brand can use text-align. */
.navbar-logo > img {
display: inline;
}
/* Reference .btn geometry without the public .btn skin. The 14px SVG keeps
* main.css's 1em size and -0.15em baseline; list-inline owns the item spacing. */
.navbar-top .jio-nav-icon {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
touch-action: manipulation;
border: 1px solid transparent;
border-radius: 4px;
user-select: none;
}
/* 主题切换圆钮的图标与相邻导航图标同尺寸、同基线。
* .toggle-radius 固定 29px 且不设字号,字形会继承 .navbar-top 的 15px,
* 比旁边 14px 的账户/搜索图标大一圈;同时 29px 的集群比 34px 的账户集群矮,
* 同为顶部对齐时中心低 2.5px。这里对齐字号,并把圆钮在 34px 行内垂直居中。 */
.navbar-top .toggle-theme.toggle-radius {
font-size: 14px;
}
.navbar-top .navbar-form:has(> .toggle-theme) {
display: flex;
align-items: center;
min-height: 34px;
}
.navbar-search .line-form-input:focus,
.navbar-search .line-form-input:focus-visible {
outline: 0;
box-shadow: none;
}
.jio-header-userbox {
color: var(--color-ink-2);
line-height: 1.42857143;
}
/* public.css redeclares .muted-box after the legacy utility rules, which
* otherwise overrides the wallet tiles' padding-6 and radius4 utilities. */
.jio-header-userbox .muted-box.padding-6 {
background-color: var(--this-bg, var(--color-line-soft));
border-radius: 4px;
padding: 6px;
}
/* core/buttons.css restates the legacy .but block after main.css, so its
* background / color / border / text-shadow declarations outrank .payvip-icon
* and replace the payvip surface with whatever .jb-* skin is on the element.
* The reference theme has no such compatibility layer, so its .payvip-icon
* declarations are the last word in the cascade. Re-assert them here, which
* loads after core/buttons.css, so every payvip surface (top-nav chip, user
* card status bar and CTA, guest CTA) keeps the legacy metallic gradient. */
.payvip-icon {
background: linear-gradient(300deg, #4c4d51, #2a2a31 15%, #85858a 40%, #393a3c 60%, #393838 80%, #5e5f62 100%);
color: #ece0e0;
--this-color: #ece0e0;
border: none;
text-shadow: none;
}
/* Keep the header check-in action flush with the VIP row's padded inner width. */
.jio-header-userbox > .mt6.em09 > .but.block {
display: block;
box-sizing: border-box;
width: 100%;
}
/* Top-nav bell badge (the card itself uses the legacy badge.top element). */
.jio-nav-notification .jio-notification-badge {
position: absolute;
top: 2px;
right: 2px;
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 16px;
height: 16px;
padding: 0 4px;
border: 2px solid var(--surface-1);
border-radius: 999px;
background: #e74c3c;
color: #fff;
font-size: 9px;
font-weight: 700;
line-height: 1;
}
/* Navigation links are globally capped at 50px. Account actions are taller
* icon tiles and must opt out or their labels overlap the following row.
* The tile geometry itself stays with the shared legacy rules
* (.header-user-href > a and .header-user-href .toggle-radius in main.css)
* so the action row keeps the reference proportions. */
.navbar-top .jio-header-userbox .header-user-href > a,
.jio-header-userbox .header-user-href > a {
max-height: none;
}
.mobile-navbar .jio-header-userbox {
width: auto;
max-width: 400px;
margin: auto;
}