-
Notifications
You must be signed in to change notification settings - Fork 39
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
Off-canvas Navigation/Menu (Mobile) in Pure CSS using Tachyons? #10
Comments
…o make it *look* more App-y. dwyl/learn-tachyons#10
This is a pure CSS one that looks good, but I needs to be 'converted' to tachyons if we use it (looks mostly achievable without custom tachyons classes): https://isabelcastillo.com/pure-css-mobile-toggle-menu |
This is what has been implemented on the dwyl-site redesign: https://github.com/dwyl/dwyl-site/pull/264/files#diff-b0638442d6af953ff33fca3d49113579L18 It is based on a similar approach to the link shared by @iteles. In summary you use a checkbox as your burger menu which alternates between hiding and revealing the menu when it is checked or unchecked (ie. when a user clicks on the burger to open/close the menu). The checkbox is hidden by using a In order to display the menu, another class is required which uses the magic of the tilde It was achieved using:
|
Not pure CSS, but for anyone looking for a javascript way, here is an example: https://coralproject.net/ Right click to view its source and search for It uses simple javascript to manipulate DOM class, and uses SVG for the burger button. Quite clean and straightforward. |
Responsive Nav Menu Example issue #10
Can we build an "off-canvas" in pure CSS (without) an JS...?
Links/examples/code please if you have come across it! 👍
Edit:
Thanks to @Cleop for implementing this for the @dwyl site. #10 (comment)
We have split the code and simplified it so that anyone can learn from it!
GOTO: https://github.com/dwyl/learn-tachyons#responsive-navigation-menu
The text was updated successfully, but these errors were encountered: