consento-org / consento-website

Ghost theme used for consent.org domain
https://consento.org
Other
1 stars 0 forks source link

Topnavigation, Mobile: shadown not shown on 0 #69

Closed martinheidegger closed 4 years ago

martinheidegger commented 4 years ago

When the menu is closed, its okay/expected for the shadow to be hidden on mobile devices but when the menu is opened, the shadow should be visible, right now its not

Torgian commented 4 years ago

Refer to commit

I tried a few different methods on adding / removing the shadow based on element offsetTop, as well as trying to make the code a bit more compact. However, I ran into problems when invoking a Promise based on the css transition ending. I'd still like to explore this option in the future, but respect to our time-table, I decided to go for a more simple version.

Tests run 4.0 for the following:

Shadow is added / removed when clicking the menu toggle button and the window is scrolled all the way to the top. Shadow is not removed when menu is opened, and the user scrolls all the way back to the top of the window. Shadow is not removed if the window is scrolled down, and the menu is opened and/or closed.

Again, I tried to think of a better way to implement this, but I don't want to spend too much time on this until after the other issues are fixed.

martinheidegger commented 4 years ago

Okay, yeah, the code is pretty ~ugh but it seems to work, which is enough for now. Though lets leave the issue open as a memory to clean this.

martinheidegger commented 4 years ago

Closed in #88