Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

FSE: Submenus with background color inherit CSS on pages where list block is present #75908

Closed syhussaini closed 2 weeks ago

syhussaini commented 1 year ago

2023-04-18 Update - Findings show that this is not unique to Bitácora, but to any FSE theme where the submenu has a background color. Relevant Gutenberg report: https://github.com/WordPress/gutenberg/issues/49445 -cuemarie

Quick summary

Bitácora Theme shows submenus with additional Padding when the Page has a list of items added using List Block. The submenu appears correctly when the page without a List Block is viewed.

Please see this image for reference:

Steps to reproduce

  1. Activate Bitácora theme.
  2. Now add submenu items in the menu
  3. Add a new page with List Block
  4. Now view the page with the List Block to see the menu appear with additional padding.submenu items

What you expected to happen

The menu should appear the same as it appears when on a page without a List Block.

image

What actually happened

The submenu appears with additional padding.

Impact

Some (< 50%)

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Simple

Logs or notes

No response

syhussaini commented 1 year ago

user on this ticket 6211163-zen is impacted with this issue.

github-actions[bot] commented 1 year ago

Support References

This comment is automatically generated. Please do not edit it.

cuemarie commented 1 year ago

Very similar issue reported here on Munchies theme:

I've been having trouble replicating but perhaps between the two I can figure this out :)

cuemarie commented 1 year ago

📌 SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain

📌 FINDINGS/SCREENSHOTS/VIDEO

https://user-images.githubusercontent.com/27249804/232927228-998e375f-0f5e-474f-8af7-f48f346c4592.mp4

Looks like it's stemming from this inline CSS:

ol.has-background, ul.has-background {
  padding: 1.25em 2.375em;
}

Which is overriding the default padding setting for the .wp-block-navigation ul:

.wp-block-navigation ul, .wp-block-navigation ul li {
  list-style: none;
  padding: 0;
}

0MZj5V.gif

Same result on AT and Simple, tested with CTGL, Vetro, and

AT Site, Vetro

UIQMLk.gif

Simple Site, CTGL vk7dPs.gif

**Simple Site, TT3 (Default) Ry35sZ.png

📌 ACTIONS

cuemarie commented 1 year ago

User report from #75244, who would like to be notified when this is resolved:

cuemarie commented 1 year ago

Ran into this here: 42217934-hc

Provided the following CSS as a workaround:

/* fix submenu padding bug | xxx-hc [XX] */
.wp-block-navigation ul, .wp-block-navigation ul li {
  list-style: none;
  padding: 0;
}
cuemarie commented 1 year ago

Also related:

cuemarie commented 1 year ago

Created a more generalized core report here:

ariel-maidana commented 1 year ago

6267568-zd-woothemes Please notify the user once this issue is fixed.

ariel-maidana commented 1 year ago

Another case here: 6279660-zd-woothemes Please let the user know once this issue is fixed.

sourourn commented 1 year ago

Another case here: 6318112-zd-woothemes Please let the user know once this issue is fixed.

jp-imagines commented 1 year ago

Came across another instance in 6569091-zd-woothemes, gave CSS to fix. Follow-up not needed.

CodeAllNightNDay commented 1 year ago

Encountered the issue here: 6773296-zen

Gave CSS for the workaround.

eduardozulian commented 9 months ago

Another report in 7391190-zen, using the Munchies theme. Shared the following CSS as a workaround:

ul.wp-block-navigation-submenu.has-background {
    padding: 0;
}
annezazu commented 2 weeks ago

Digging through layers of reports on the Gutenberg GitHub repo and this should have been resolved:

https://github.com/WordPress/gutenberg/issues/50486#issuecomment-2225715338

I am going to close this out but let's please reopen and/or flag for me if folks can still replicate this. Thank you!