Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| testing:nav [2026/09/19 02:01] – ayush | testing:nav [2026/09/19 02:06] (current) – ayush | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| * SPP 2115 adaptive primary navigation | * SPP 2115 adaptive primary navigation | ||
| * | * | ||
| - | * Bootstrap | + | * Bootstrap |
| - | * intrinsic | + | * intrinsic measurement, |
| - | * float layout and fixed responsive breakpoint. | + | * float-based |
| */ | */ | ||
| #dw__navbar { | #dw__navbar { | ||
| - | /* Dimensions | + | /* Component dimensions |
| --spp-navbar-height: | --spp-navbar-height: | ||
| --spp-navbar-touch-target: | --spp-navbar-touch-target: | ||
| - | --spp-navbar-radius: | ||
| /* Typography — sourced from tokens.css */ | /* Typography — sourced from tokens.css */ | ||
| - | --spp-navbar-font-size: var(--table-size); | + | --spp-navbar-font-size: |
| - | --spp-navbar-font-size-compact: | + | --spp-navbar-line-height: |
| - | --spp-navbar-font-size-secondary: var(--caption-size); | + | |
| - | --spp-navbar-line-height: var(--table-line-height); | + | |
| - | --spp-navbar-line-height-compact: | + | |
| - | --spp-navbar-line-height-secondary: var(--caption-line-height); | + | |
| --spp-navbar-weight: | --spp-navbar-weight: | ||
| --spp-navbar-weight-strong: | --spp-navbar-weight-strong: | ||
| Line 60: | Line 55: | ||
| } | } | ||
| - | #dw__navbar .navbar-nav > li > a { | + | /* |
| + | * Keep every font metric identical across all interaction states. | ||
| + | * | ||
| + | * Bootstrap adds .active and .open classes during interaction. None of | ||
| + | * those states may change font size, weight, line height, or spacing, | ||
| + | * because doing so causes visible text expansion and layout movement. | ||
| + | */ | ||
| + | |||
| + | #dw__navbar .navbar-nav > li > a, | ||
| + | #dw__navbar .navbar-nav > li > a:hover, | ||
| + | #dw__navbar .navbar-nav > li > a:focus, | ||
| + | #dw__navbar .navbar-nav > .active > a, | ||
| + | #dw__navbar .navbar-nav > .active > a:hover, | ||
| + | #dw__navbar .navbar-nav > .active > a:focus, | ||
| + | #dw__navbar .navbar-nav > .open > a, | ||
| + | #dw__navbar .navbar-nav > .open > a:hover, | ||
| + | #dw__navbar .navbar-nav > .open > a: | ||
| font-size: var(--spp-navbar-font-size); | font-size: var(--spp-navbar-font-size); | ||
| font-weight: | font-weight: | ||
| Line 69: | Line 80: | ||
| color var(--spp-navbar-duration-fast) ease, | color var(--spp-navbar-duration-fast) ease, | ||
| background-color var(--spp-navbar-duration-fast) ease; | background-color var(--spp-navbar-duration-fast) ease; | ||
| - | } | ||
| - | |||
| - | #dw__navbar .navbar-nav > : | ||
| - | font-weight: | ||
| } | } | ||
| #dw__navbar .dropdown-menu > li > a { | #dw__navbar .dropdown-menu > li > a { | ||
| - | font-size: var(--spp-navbar-font-size-secondary); | + | font-size: var(--spp-navbar-font-size); |
| font-weight: | font-weight: | ||
| - | line-height: | + | line-height: |
| letter-spacing: | letter-spacing: | ||
| } | } | ||
| #dw__navbar .dropdown-header { | #dw__navbar .dropdown-header { | ||
| - | font-size: var(--spp-navbar-font-size-secondary); | + | font-size: var(--spp-navbar-font-size); |
| font-weight: | font-weight: | ||
| - | line-height: | + | line-height: |
| letter-spacing: | letter-spacing: | ||
| } | } | ||
| Line 123: | Line 130: | ||
| #dw__navbar .dropdown.open > .dropdown-toggle .caret { | #dw__navbar .dropdown.open > .dropdown-toggle .caret { | ||
| transform: rotate(180deg); | transform: rotate(180deg); | ||
| - | } | ||
| - | |||
| - | /* ------------------------------------------------------------------------- | ||
| - | * Safe pre-initialisation state | ||
| - | * ---------------------------------------------------------------------- */ | ||
| - | |||
| - | # | ||
| - | float: none; | ||
| - | } | ||
| - | |||
| - | # | ||
| - | display: block; | ||
| - | } | ||
| - | |||
| - | # | ||
| - | display: none !important; | ||
| } | } | ||
| Line 144: | Line 135: | ||
| * Intrinsic measurement | * Intrinsic measurement | ||
| * | * | ||
| - | * navbar.js | + | * navbar.js |
| - | | + | |
| + | * layout rules compete with these measurement rules. | ||
| + | * | ||
| + | * The state exists only during a synchronous layout read and is restored | ||
| + | * before the browser paints. | ||
| * ---------------------------------------------------------------------- */ | * ---------------------------------------------------------------------- */ | ||
| Line 182: | Line 177: | ||
| overflow: visible !important; | overflow: visible !important; | ||
| + | |||
| + | border-top: 0 !important; | ||
| + | box-shadow: none !important; | ||
| } | } | ||
| Line 299: | Line 297: | ||
| # | # | ||
| - | min-width: max(12rem, 100%); | ||
| margin-top: 0; | margin-top: 0; | ||
| padding-block: | padding-block: | ||
| border: 1px solid rgb(0 0 0 / 10%); | border: 1px solid rgb(0 0 0 / 10%); | ||
| - | border-radius: | + | border-radius: |
| box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 12%); | box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 12%); | ||
| Line 341: | Line 338: | ||
| display: flex; | display: flex; | ||
| align-items: | align-items: | ||
| - | |||
| - | min-height: var(--spp-navbar-height); | ||
| float: none; | float: none; | ||
| Line 370: | Line 365: | ||
| border-color: | border-color: | ||
| - | border-radius: | + | border-radius: |
| transition: | transition: | ||
| Line 397: | Line 392: | ||
| } | } | ||
| - | /* Hamburger to close icon */ | + | /* Hamburger to close */ |
| # | # | ||
| Line 423: | Line 418: | ||
| # | # | ||
| - | clear: both; | ||
| - | |||
| width: auto; | width: auto; | ||
| - | margin-inline: | ||
| - | padding-inline: | ||
| border-top: 1px solid rgb(255 255 255 / 10%); | border-top: 1px solid rgb(255 255 255 / 10%); | ||
| - | background: inherit; | ||
| box-shadow: none; | box-shadow: none; | ||
| } | } | ||
| Line 449: | Line 439: | ||
| /* | /* | ||
| - | * Bootstrap | + | * Bootstrap |
| + | * mechanism but replace its legacy timing with a smoother easing curve. | ||
| */ | */ | ||
| Line 464: | Line 455: | ||
| /* | /* | ||
| - | * Animate | + | * Animate |
| */ | */ | ||
| Line 486: | Line 477: | ||
| } | } | ||
| - | /* Keep a fixed navbar | + | /* Fixed-navbar viewport |
| # | # | ||
| Line 507: | Line 498: | ||
| float: none !important; | float: none !important; | ||
| - | width: auto; | ||
| margin: 0 -15px; | margin: 0 -15px; | ||
| - | padding-block: | ||
| } | } | ||
| Line 521: | Line 510: | ||
| min-height: var(--spp-navbar-touch-target); | min-height: var(--spp-navbar-touch-target); | ||
| - | padding: 0.625rem | + | padding: 0.6875rem |
| - | | + | font-size: var(--spp-navbar-font-size); |
| - | + | font-weight: | |
| - | | + | line-height: |
| - | line-height: | + | |
| white-space: | white-space: | ||
| - | } | ||
| - | |||
| - | # | ||
| - | .navbar-nav | ||
| - | > li | ||
| - | > .dropdown-toggle { | ||
| - | gap: 0.375rem; | ||
| - | } | ||
| - | |||
| - | # | ||
| - | .navbar-nav | ||
| - | > li | ||
| - | > .dropdown-toggle | ||
| - | .caret { | ||
| - | margin-left: | ||
| } | } | ||
| /* | /* | ||
| - | * Bootstrap hides these labels outside its legacy XS breakpoint. | + | * Bootstrap hides these labels outside its legacy XS breakpoint. In the |
| + | * content-aware compact mode they should always be visible. | ||
| */ | */ | ||
| Line 562: | Line 536: | ||
| float: none !important; | float: none !important; | ||
| - | width: 100%; | ||
| margin-inline: | margin-inline: | ||
| } | } | ||
| Line 571: | Line 544: | ||
| border-top: 1px solid rgb(255 255 255 / 8%); | border-top: 1px solid rgb(255 255 255 / 8%); | ||
| - | } | ||
| - | |||
| - | # | ||
| - | display: flex; | ||
| - | align-items: | ||
| - | |||
| - | min-height: var(--spp-navbar-touch-target); | ||
| - | margin-block: | ||
| - | |||
| - | font-size: var(--spp-navbar-font-size-compact); | ||
| - | line-height: | ||
| } | } | ||
| Line 597: | Line 559: | ||
| width: auto; | width: auto; | ||
| - | margin: 0.125rem 0 0.375rem | + | margin: 0 1rem 0.375rem; |
| padding: 0.125rem 0 0.25rem 0.75rem; | padding: 0.125rem 0 0.25rem 0.75rem; | ||
| Line 623: | Line 585: | ||
| font-size: var(--spp-navbar-font-size); | font-size: var(--spp-navbar-font-size); | ||
| + | font-weight: | ||
| line-height: | line-height: | ||
| white-space: | white-space: | ||
| } | } | ||
| + | |||
| + | /* Expanded-panel separation */ | ||
| # | # | ||