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

Question about the Off-Canvas Navigation #74

Open
iaindarkflare opened this issue Jul 15, 2015 · 5 comments
Open

Question about the Off-Canvas Navigation #74

iaindarkflare opened this issue Jul 15, 2015 · 5 comments
Labels

Comments

@iaindarkflare
Copy link

Hi James,

I want to use the off-canvas navigation on mobile, but have the nav visible on desktop, what's the best way of doing so?

I reckon that I can either; duplicate the nav and use the hidden and visible classes…or…override the width and visibility of .navigation for desktop only using the media queries within my css.

The duplicate may be the most straightforward way, especially if the layout of the nav on desktop would be considerably different from the mobile, but toggling the visibility may work best if the navigation is to be left or right aligned.

Just wanted to check in case I'm being daft and missing an easy way of setting it so the off-canvas nav only kicks in on certain layouts?

Alternatively, would I be best to use the previous method for creating navigation using the dropdown functionality when the layouts don't fit?

Just trying to be mindful of the aria-hidden attribute that is applied by the navigation.

Cheers,
Iain

@JimBobSquarePants
Copy link
Member

To be honest I'm not sure. This iteration of the navigation menu is an all or nothing approach.

Duplication probably isn't wise since the presence of duplicate elements could confuse screen readers so I would recommend using media queries and the $.support.currentGrid() method to let you know when to toggle the aria hidden attribute.

It might however, be simpler to take the basis of my code and use that for whatever you need.

I did make a start to making the navigation toggleable but haven't got far since I don't know if I can cater for what developers would need. I would like to have another crack at it though when I can.

@iaindarkflare
Copy link
Author

Okay, I'll see what I can do. Thanks for getting back to me!

@JimBobSquarePants
Copy link
Member

No worries 😄 I'll start experimenting again as soon as I can. It's all hectic here at the moment though what with the big move and all.

@iaindarkflare
Copy link
Author

I would imagine. Hope it all goes well! :)

@JimBobSquarePants
Copy link
Member

Cheers!

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

No branches or pull requests

2 participants