WordPress.org

Make WordPress Core

Ticket #45866: 45866.patch

File 45866.patch, 1.2 KB (added by mohsinrasool, 11 months ago)

Patch to set fix width issue of the submenu item in both .scss and .css files.

  • wp-content/themes/twentynineteen/sass/navigation/_menu-main-navigation.scss

    diff --git a/wp-content/themes/twentynineteen/sass/navigation/_menu-main-navigation.scss b/wp-content/themes/twentynineteen/sass/navigation/_menu-main-navigation.scss
    index 4bbd9cf..502fdf6 100644
    a b  
    205205                                line-height: $font__line-height-heading;
    206206                                text-shadow: none;
    207207                                padding: calc( .5 * #{$size__spacing-unit} ) calc( 24px + #{$size__spacing-unit} ) calc( .5 * #{$size__spacing-unit} ) $size__spacing-unit;
    208                                 white-space: nowrap;
     208                                max-width: #{20 * $size__spacing-unit};
    209209
    210210                                &:hover,
    211211                                &:focus {
  • wp-content/themes/twentynineteen/style.css

    diff --git a/wp-content/themes/twentynineteen/style.css b/wp-content/themes/twentynineteen/style.css
    index ccf9014..6a628a9 100644
    a b body.page .main-navigation { 
    29462946  line-height: 1.2;
    29472947  text-shadow: none;
    29482948  padding: calc( .5 * 1rem) calc( 24px + 1rem) calc( .5 * 1rem) 1rem;
    2949   white-space: nowrap;
     2949  max-width: 20rem;
    29502950}
    29512951
    29522952.main-navigation .sub-menu > li > a:hover, .main-navigation .sub-menu > li > a:focus,