Amulet: Empty Space on the Right Side on Mobile #8308
Description
Quick summary
On mobile, the theme has some extra space to the side, causing some issues including the inability to close the full page menu.
Steps to reproduce
- Enable the Amulet theme. Or go to the demo site: https://amuletdemo.wpcomstaging.com/
- Switch to mobile view on your browser
- Scroll to the left and right
- Notice the white space on the right
- You can also open the menu and see how the 'x' close button is out of view
A clear and concise description of what you expected to happen.
The page should not scroll left and right on mobile.
The X button on the menu should appear within the view.
What actually happened
There is an empty space on the right of all content:
Impact
Some (< 50%)
Available workarounds?
Yes, easy to implement
If the above answer is "Yes...", outline the workaround.
This is a mix of two issues:
Issue 1: There is an ongoing issue with FSE where text breaks don't apply automatically - #7409
This can be addressed by editing all the default H2 blocks included with the theme, but that's sub-optimal.
A quick one is to use this CSS code:
@media only screen and (max-width: 700px) {
h2:not([class^="has"]), .has-x-large-font-size{
font-size: 14vw !important;
word-break: break-word;
}
}
Issue 2: .alignfull elements use a negative margin, this can be fixed with this code:
@media only screen and (max-width: 700px) {
.alignfull {
margin-right: 0 !important;
margin-left: 0 !important;
}
}
This can also be customized from FSE, but there are too many blocks to customize.
Platform (Simple and/or Atomic)
No response
Logs or notes
Aside from the general FSE issue #7409 , The following .alignfull negative margins are problematic:
.wp-container-core-group-is-layout-7 > .alignfull {
margin-right:calc(5vw * -1);
margin-left:calc(5vw * -1);
}
.wp-container-core-group-is-layout-3 > .alignfull {
margin-right:calc(3vw * -1);
margin-left:calc(3vw * -1);
}
.
.
Negative margins have the opposite effect of margin, making the blocks bigger than their container (if not restricted). In this case 5vw and 3vw bigger.
8917691-zen
Metadata
Assignees
Labels
Type
Projects
Status
Triaged
Activity