Skip to content
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

Nav menu size. #2

Closed
wants to merge 2 commits into from
Closed

Nav menu size. #2

wants to merge 2 commits into from

Conversation

Gwash3189
Copy link

I change the @sp-nav-offset variable to 80% instead of 272px. Using percentage in a case like this allows you to fully adapt to the variable sizes of phone screens. Additionally, i think 80% is big enough to display additional information in the nav (if you were to use this as a menu, and not a nav) but still small enough to display the nav button

I change the @sp-nav-offset variable to 80% instead of 272px. Using percentage in a case like this allows you to fully adapt to the variable sizes of phone screens. Additionally, i think 80% is big enough to display additional information in the nav (if you were to use this as a menu, and not a nav) but still small enough to display the nav button
@jeff-french
Copy link
Contributor

Thanks for PR! I initially had this as a percentage but it wasn't so great for larger screens (tablets, desktop). However, I think that using 80% will work great for adapting to phone screen sizes and maybe use a media query to set a smaller percentage for larger screens. Thoughts?

@Gwash3189
Copy link
Author

That could work, although i haven't tested it on a large screen (tablet in portrait). i'll be honest though, i am a little inexperienced with it comes to this advanced level of CSS

I've split the css classes up in to different classes so the menu can either be slid from left or write. I've also added a 'scrollable' class to allow the menu to be scrollable if the menu has a lot of vertical data to show.
@Gwash3189
Copy link
Author

I just tested your demo page, with my changes, on 1080 x 1920 and the sliding still seems to work fine. It slides 80% of the screen displaying the 'nav' section of the page. So i would assume that a breakpoint for larger screens would not be needed.

Also, as you can see i've added another commit that relates to issue #3. As you can see i've only edited the css file, i didn't know how to effectively replicate my changes in LESS. Maybe you could do that since you seem to know it well?

@jeff-french
Copy link
Contributor

I've implemented the 80% width in Release v0.1.3. By default the menu will only open to 20% on larger screens. If you want it to always open to 80% regardless off screen size then add class="wide" to your #sp-nav element. I will incorporate your "slide from right" changes in another release soon.

@Gwash3189
Copy link
Author

Thanks for that @jeff-french

Looking forward to the slide from right changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants