Twenty Twenty Theme Margins Issue
-
Hi,
I’ve used PDF Embedder on a couple of sites with child themes based on Twenty Seventeen and Twenty Nineteen, and it works excellently – thank you. But now I’m having trouble with it on an as-yet unpublished Twenty Twenty-themed site I’m building. (I’m actually using a minimally modified child theme, but the issue is still present when I switch to the unmodified parent theme.)
The issue is different from that in a thread started by Security Farm (Topic Title “Twenty Twenty Theme”) a couple of years ago. I have, incidentally, applied the fixes that you suggested to Security Farm in that thread.
My issue is this: I’m finding that on a page with the default template the presence of a PDF Embedder viewer reduces to zero the margins of other elements on the page. The issue disappears when the PDF Embedder viewer is removed, and reappears when it is restored.
Using the Inspector in Firefox, I noticed that the presence of the PDF Embedder block causes this CSS rule to be added (source: pdfemb-embed-pdf.css?ver=4.6.4):
.entry-content > :not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce), .entry-content > .wp-block-pdfemb-pdf-embedder-viewer { max-width: none; }
If I disable the rule, the issue disappears and my normal margins are restored (
max-width: 76.8rem
) in accordance with the next rule down:.entry-content > :not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.is-style-wide), #site-content-wrapper { max-width: 76.8rem; }
Any suggestions on how to fix the
max-width: none
issue?Apologies if this issue has been raised previously, but I haven’t been able to find it by searching.
- The topic ‘Twenty Twenty Theme Margins Issue’ is closed to new replies.