• Resolved Drew

    (@drewuniverse)


    I’m having a mysterious issue with submenu padding. In short, if I set a background color for the nav block’s submenu, it also adds a lot of left/right padding which I didn’t set or ask for. I assume that what WP is doing is creating default properties for has-background once it’s demanded by act of my selecting a submenu BG color. The nav block is in my header. I am using WP’s Twenty Twenty-Two theme.

    The reason I call this issue mysterious, is because this large padding increase only takes effect on certain pages, or perhaps certain page templates. Any page with the “Project” or “Guide” page templates I created seem to have the increased padding issue, as well as news posts. However, a third template I created doesn’t result in the padding issue – and it’s not on the default page template either. If you check the submenu in the last two links, it will appear as I’m intending. I have to believe that something I set in the Project and Guide templates is causing this, but I don’t understand how a page template would be allowed to manipulate a separate template part (the header) where my nav block resides.

    I have attempted multiple additional-CSS solutions from similar posts to no avail thus far. Ultimately, it would be great if submenu padding/margin options were added to submenu blocks, but since those aren’t selectable parameters I’m seeking the community’s guidance. Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 16 through 17 (of 17 total)
  • Solved with this until the bug is fixed:

    ul.wp-block-navigation__submenu-container {
    padding: 0;}

    Thread Starter Drew

    (@drewuniverse)

    Hi @danbru , thanks for posting that it happened to you, and for finding the report has already been made. I think this is just an oversight from a design perspective. Perhaps I am seeing it wrong, but to me, there’s no reason a list block’s properties should have to be tied to submenu properties within a navigation block.

    Yes, they are both “lists” of things, but they serve two unique purposes. It is common to style a nav menu independently from any list the site may have. The developers probably just need to create a specific property for the navigation and list blocks so they don’t intertwine anymore. Thanks again for checking in!!

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Forced Submenu Padding When Adding Submenu Background Color’ is closed to new replies.