themes icon indicating copy to clipboard operation
themes copied to clipboard

Gateway: setting a custom body font size in CSS breaks dropdown menus

Open interlineae opened this issue 8 years ago • 1 comments

When a body font size is declared in My Site --> Customize --> CSS, a gap is introduced between parent and sub-menu items, making it impossible to interact with sub-menus.

Screencast video here: https://cl.ly/2U1k2x3N1K0M

Steps to replicate

  • Activate Gateway on test site (or visit demo site if you have admin access)
  • Visit the Customize --> CSS section
  • Declare a custom body font size:
/** Increase body font size */
body {
    font-size: 2.5rem;
}
  • Sub-menu items are now spaced too far from parent items to be interacted with. Setting an additional style on .main-navigation ul ul to top: initial; resolves the behaviour.

Result

A gap is introduced between parent and sub-menu items.

Expected

Body font size should change, and menu behaviour should not be affected.

  • User report: #3854172-hc (User is not expecting a follow up as a CSS solution was provided)
  • User's site: http://medicalphysicscoop.co.uk

interlineae avatar May 27 '18 20:05 interlineae

Fixed in https://wpcom-themes.trac.automattic.com/changeset/48865

thomasguillot avatar May 29 '18 13:05 thomasguillot