Skip to content

Commit 58a3170

Browse files
mlaetitiaclaude
andcommitted
Stop panel switches from cross-fading (dim flashed through two translucent panels) and move the header divider line to the open-state veil so it never flickers
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent bd98ba2 commit 58a3170

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

‎themes/osi/assets/scss/_6_components.header.scss‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@
161161
// open-panel layers: full-bleed white veil (::after escapes the wrapper inset) and
162162
// page dim; z-index -1 keeps both under content, tree order paints veil over dim
163163
@mixin nav-open-layers {
164+
// the border is the header/panel divider: on the veil so it never fades with panel switches
164165
&::after {
165166
background-color: $Nwhite;
167+
border-bottom: 1px solid $Nlight;
166168
content: '';
167169
inset: 0 (-$wrapperPad);
168170
position: absolute;

‎themes/osi/assets/scss/_6_components.navigation--subnav.scss‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,10 @@
381381
}
382382

383383
// full-bleed panel: negative offsets escape the wrapper's inset, and the
384-
// content padding re-applies it so panel items align with the header content
384+
// content padding re-applies it so panel items align with the header content.
385+
// Closing freezes the panel solid for .2s so panel switches never cross-fade
386+
// (two translucent panels would flash the dimmed page through)
385387
& > ul.sub-menu {
386-
border-top: 1px solid $Nlight;
387388
box-shadow: 0 14px 18px -10px rgba(#{$Ndarkest_RGB}, 0.2);
388389
display: grid;
389390
gap: 0 2.5rem;
@@ -398,7 +399,7 @@
398399
text-align: left;
399400
top: 100%;
400401
transform: translateY(8px);
401-
transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
402+
transition: opacity 0s linear .2s, transform 0s linear .2s, visibility 0s linear .2s;
402403
visibility: hidden;
403404
width: auto;
404405

@@ -503,13 +504,15 @@
503504
}
504505
}
505506

506-
// keyboard open is JS-driven (.is-open); :focus-within here would defeat Escape
507+
// keyboard open is JS-driven (.is-open); :focus-within here would defeat Escape.
508+
// The z-index bump paints the entering panel above a still-solid exiting one
507509
&:hover > ul.sub-menu,
508510
&.is-open > ul.sub-menu {
509511
opacity: 1;
510512
transform: none;
511513
transition: opacity .2s ease, transform .2s ease;
512514
visibility: visible;
515+
z-index: 100;
513516
}
514517
}
515518
}

‎themes/osi/style.css‎

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)