-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Revamp Pure Menu #142
Closed
Closed
Revamp Pure Menu #142
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d20590c
Revamp menus
tilomitra fa7ffd3
Revamp Menus to make them mobile-first with dropdown support
tilomitra f0754b3
update Gruntfile for new menus
tilomitra 5aaebe0
add border-box rule
tilomitra b247b2d
add customized menu example
tilomitra e8c0245
Merge branch 'master' of github.com:yui/pure into new-menu
tilomitra 87eff25
change order of concatenation
tilomitra eab6a0c
add z-index in case another menu is behind this menu
tilomitra 4a52463
add white background over dropdown children
tilomitra 9c55ca2
update menus manual test
tilomitra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* By default, don't show the .pure-menu-children. */ | ||
.pure-menu-children { | ||
display: none; | ||
position: absolute; /* absolute positioned inside a relative container */ | ||
margin: 0; | ||
padding: 0; | ||
z-index: 2; | ||
} | ||
|
||
/* Vertical Menus - when an item is interacted with, show the children */ | ||
.pure-menu-item:hover > .pure-menu-children, | ||
.pure-menu-item:focus > .pure-menu-children { | ||
display: block; | ||
top: 0; | ||
left: 100%; | ||
width: 100%; | ||
} | ||
|
||
/* Horizontal Menus - when an item is interacted with, show the children */ | ||
.pure-menu-horizontal .pure-menu-item:hover > .pure-menu-children, | ||
.pure-menu-horizontal .pure-menu-item:focus > .pure-menu-children { | ||
top: 100%; | ||
left: 0; | ||
width: inherit; | ||
} | ||
|
||
.pure-menu-is-active .pure-menu-children { | ||
display: block; | ||
position: static; | ||
} | ||
|
||
/* Regular Menus - show the dropdown arrow */ | ||
.pure-menu-has-children > .pure-menu-link:after { | ||
padding-left: 0.5em; | ||
content: "\25B8"; | ||
} | ||
|
||
/* Horizontal Menus - show the dropdown arrow */ | ||
.pure-menu-horizontal .pure-menu-has-children > .pure-menu-link:after { | ||
content: "\25BE"; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
@media (max-width: 480px) { | ||
.pure-menu-horizontal { | ||
width: 100%; | ||
@media (min-width: 48em) { | ||
.pure-menu-responsive .pure-menu-list { | ||
display: inline-block; | ||
} | ||
|
||
.pure-menu-children li { | ||
display: block; | ||
border-bottom: 1px solid black; | ||
.pure-menu-responsive-toggle { | ||
display: none; | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole file should be killed, since it has media queries in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no way for this to work for people since we have no idea how many items are in the menu, and that's a variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericf Read the section Responsive Menus and Overriding Media Queries in the PR Description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I read that. So if people are going to have to add media queries anyways, we should remove this. If I have a menu with two–three items in it, it might not need to collapse on an iPad in portrait, or an larger screen phone, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should still provide the option of linking to this file from the CDN. I am cool with excluding it from the build roll-ups, so it has to be pulled in separately.