samnabi / shopkit

Comprehensive commerce solution for Kirby CMS v2
https://shopkit.samnabi.com
Other
99 stars 15 forks source link

Hopping navbar on every reload/page change #188

Closed Mojo90 closed 6 years ago

Mojo90 commented 6 years ago

I recognized on my site that the navbar hopps up (I think 4px) on every reload or page change after a few milliseconds. Than I saw that it is the same on shopkit site (https://shopkit.samnabi.com), so it is not an error on my site. Maybe has to do sth. with the lines from 437 in shopkit.scss:

button[aria-expanded="false"] + * {
    opacity: 0;
    max-height: 0 !important; /* Overrides the inline max-height applied by JavaScript */
}
.animate button[aria-expanded] + * {
    transition: max-height 0.3s, opacity 0.5s;
}

But I am not sure.

samnabi commented 6 years ago

This is a weird positioning issue involving a combination of absolute positioning and borders.

This is Fixed by adding border: 2px solid $accent; to the .animate .login form selector instead of .login form.

(Fix to the master branch is coming in a few days.)

Mojo90 commented 6 years ago

Yep perfect that does the trick, thanks!