-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep scale effect for navbar hider/shower? #2269
Comments
I actually pushed the scale effect accidentally. So I'd totally be fine removing it. It adds some uneasiness to the transition IMO. |
Yup just tried. These scenarios: Scenario 1 - Without scaleThis is a bit better but the opacity change is a bit disturbing (and I don't know why) .is-offscreen {
opacity: 0;
transform: translateX(-50%) translateY(-100%);
}
.navigation {
position: fixed;
top: 0;
left: 50%;
z-index: 1000;
transform: translateX(-50%);
width: 100vw;
display: flex;
justify-content: center;
box-sizing: border-box;
background-color: var(--color-first);
color: var(--color-second);
transition: transform .4s ease,opacity .4s ease;
} Scenario 2 - Without scale and removing the opacity transitionThis doesn't work at all. :) Probably the worst case scenario. .is-offscreen {
opacity: 0;
transform: translateX(-50%) translateY(-100%);
}
.navigation {
position: fixed;
top: 0;
left: 50%;
z-index: 1000;
transform: translateX(-50%);
width: 100vw;
display: flex;
justify-content: center;
box-sizing: border-box;
background-color: var(--color-first);
color: var(--color-second);
transition: transform .4s ease;
} Scenario 3 - Just the transform.This one is the one which is the smoother on my eyes. .is-offscreen {
transform: translateX(-50%) translateY(-100%);
}
.navigation {
position: fixed;
top: 0;
left: 50%;
z-index: 1000;
transform: translateX(-50%);
width: 100vw;
display: flex;
justify-content: center;
box-sizing: border-box;
background-color: var(--color-first);
color: var(--color-second);
transition: transform .4s ease;
} Thanks @Regaddi for all the contributions. Super appreciated. |
btw this header which disappears when scrolling exactly addresses my comment in #2087
So thank you for this |
I'd vote for Scenario 3, since this was nearly my initial intention 😄 |
Fixes #2269 – Smoothen navbar transition
merged #2286 |
@Regaddi landed a cool feature to hide/show the navbar based on scroll in #2265
There's a small scaling effect which looks cool, but maybe won't be so cool after using it for a while. Filing this issue for people to discuss after getting some experience with it.
(Note: this isn't a blocker, we can change things here or close it).
The text was updated successfully, but these errors were encountered: