-
Notifications
You must be signed in to change notification settings - Fork 64
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
WIP: Adds mobile menu using AMP #120
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0bdba4b
Add 'hamburger' menu icon to SVG icon set.
laurelfulford df81536
Add initial pass of new files for mobile navigation and the mobile si…
laurelfulford deaa3fa
Add sidebar menu toggle, and menu sidebar template part.
laurelfulford 8d79833
Make social menu styles more general so they can be picked up by the …
laurelfulford 5c12669
Improving mobile menu styles.
laurelfulford 095f1a3
Updating button class.
laurelfulford 5e4711e
Update tertiary nav classes.
laurelfulford 87eed68
Updating tertiary nav class.
laurelfulford 27012fb
Adjusting mobile menu styles; updating existing classes so they inher…
laurelfulford e66f0a2
Reverting changes to priority menu functions; they were removed in a …
laurelfulford 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
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,72 @@ | ||
.mobile-menu-toggle { | ||
background-color: transparent; | ||
color: $color__text-main; | ||
padding: 0; | ||
|
||
&:hover, | ||
&:focus { | ||
background-color: transparent; | ||
} | ||
|
||
.svg-icon { | ||
position: relative; | ||
top: 4px; | ||
} | ||
|
||
@include media(tablet) { | ||
display: none; | ||
} | ||
} | ||
|
||
.desktop-navigation { | ||
display: none; | ||
} | ||
|
||
@include media( tablet ) { | ||
.desktop-navigation { | ||
display: block; | ||
|
||
&.tertiary-menu { | ||
display: flex; | ||
} | ||
} | ||
} | ||
|
||
#mobile-sidebar { | ||
background-color: $color__primary; | ||
font-size: $font__size-sm; | ||
padding: $size__spacing-unit; | ||
|
||
& > * { | ||
margin-bottom: $size__spacing-unit; | ||
} | ||
|
||
.mobile-menu-toggle { | ||
color: #fff; | ||
font-size: 1em; | ||
margin: 0 0 $size__spacing-unit; | ||
padding: 0; | ||
} | ||
|
||
ul { | ||
font-weight: 700; | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
|
||
ul { | ||
font-weight: 400; | ||
margin-left: $size__spacing-unit; | ||
} | ||
} | ||
|
||
a { | ||
color: #fff; | ||
display: inline-block; | ||
padding: #{ 0.25 * $size__spacing-unit } 0; | ||
} | ||
|
||
.submenu-expand { | ||
display: none; | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
.site-info, | ||
#cancel-comment-reply-link, | ||
.use-header-font, | ||
#mobile-sidebar, | ||
h1, | ||
h2, | ||
h3, | ||
|
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
div
is causing a validation error here. The AMP plugin is reporting the element as being invalid here because it is violating this constraint in theamp-sidebar > nav
tag spec:Nevertheless, even though the AMP plugin is reporting it as a validation error, it is not removing it. Also, the markup is not causing validation errors in the AMP Validator. So I'm confused.
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.
I think what you have is correct here, and there is a bug with the AMP plugin. Namely, because the parent
nav
does not have atoolbar
attribute, this constraint should not be applying.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.
I've opened a fix: ampproject/amp-wp#2926