-
Notifications
You must be signed in to change notification settings - Fork 383
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
Add support in nav-menu-toggle-sanitizer for nav_container to be either the body or root element #2327
Conversation
@felixarntz please rebase your commit on top of |
46e5383
to
24a88e9
Compare
Please rebase to |
5454cc0
to
96ccc1e
Compare
Was passing by and thought I'll do it real quick. Messed it up at first, hence the force push, but now it should be good. Sorry for the noise 🙂 |
96ccc1e
to
954c359
Compare
954c359
to
340c53a
Compare
@swissspidy Awesome, thanks!
That was my thinking as well.
We could consider accounting for that in the future, but since it's not a hard error, I think it's okay to move forward with this. |
If you want to make use of |
It looks like this would actually complicate things because of the need to update the |
|
…toggle-sanitizer * 'develop' of github.com:ampproject/amp-wp: (1124 commits) Use rounded up constant for default height Only allow pan- animations for images Adjust style for font calculation. Bring back CSS file Remove now obsolete tests and assertions Merge amp-editor-blocks into amp-block-editor Fix issue with default height when using amp-fit-text Fix typo to unbreak height text control Remove unused closure import Do font size calculation for _all_ meta blocks Improve meta block height calculation Update min and max font sizes to match amp-fit-text Apply object-fit:cover to original size images, too. Hide original resize handles. Add tests for fixes to @import handling Fix bug with non-rejected @import statements being dropped Fix bug with replacing @import with contents Improve error messages for CSS @import failures Update dependency webpack to v4.32.2 Update dependency eslint-plugin-jest to v22.6.4 ...
Build for testing: amp.zip (1.2-beta1-20190523T165154Z-35f9b0c6) |
I can get to adding tests either this Friday or early next week. |
@westonruter Tests are now present, this is good for merge from my end. |
It is possible to specify the
body
element as the target to modify the class for the navigation menu toggle to indicate whether the menu is currently toggled on or off. Several themes actually do this, because it allows the entire page (or more precisely everything inbody
) to be styled based on that class.Currently this is broken because the current implementation will try to place the corresponding
amp-state
tag before the respective element, which in this case is betweenhead
andbody
which is obviously not valid.This PR ensures that in case the
body
is specified theamp-state
tag is inserted differently, as first child ofbody
.