Sidebar: no color transition on nav links
Bootstrap's .nav-link fades color, background and border over .15s. When the browser computed styles before style.css had loaded, that fade ran from Bootstrap's blue to the template's colors on every page load, so the sidebar links flickered blue and the active link's border faded in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
449f628144
commit
705a1c4c79
1 file changed
+8
@@ -531,11 +531,19 @@ a.navbar-subtitle:hover {
|
||||
padding-top: .5rem;
|
||||
}
|
||||
|
||||
/* transition: none -- Bootstrap's .nav-link fades color, background and
|
||||
border over .15s. The browser may compute styles once while only
|
||||
bootstrap.min.css has loaded; when style.css arrives, that fade ran
|
||||
from Bootstrap's blue link color to ours, so every sidebar link
|
||||
flickered blue on each page load (and the active link's border faded
|
||||
in). Whether a change animates depends on the new style, so turning
|
||||
the transition off here stops it. */
|
||||
.sidebar .nav-link {
|
||||
color: var(--yw-nav-link);
|
||||
font-size: .85rem;
|
||||
padding: .5rem 1rem;
|
||||
border-radius: 0;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.sidebar .nav-link:hover {
|
||||
|
||||
Reference in new issue
Block a user