Twenty Nineteen: Remove transparency from submenus.

On pages and posts with featured images, the top level menu items have a slight transparency on hover, which was being inherited by their submenus. This update removes that inheritance, improving readability and consistency in the menu's appearance. 

Props kjellr.
Fixes #45689.


Built from https://develop.svn.wordpress.org/trunk@44368


git-svn-id: http://core.svn.wordpress.org/trunk@44198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
laurelfulford 2018-12-28 18:12:51 +00:00
parent b7ddbe94e7
commit bf308f6e92
5 changed files with 16 additions and 1 deletions

View File

@ -169,6 +169,7 @@
color: $color__background-body; color: $color__background-body;
display: block; display: block;
line-height: $font__line-height-heading; line-height: $font__line-height-heading;
text-shadow: none;
padding: calc( .5 * #{$size__spacing-unit} ) calc( 24px + #{$size__spacing-unit} ) calc( .5 * #{$size__spacing-unit} ) $size__spacing-unit; padding: calc( .5 * #{$size__spacing-unit} ) calc( 24px + #{$size__spacing-unit} ) calc( .5 * #{$size__spacing-unit} ) $size__spacing-unit;
white-space: nowrap; white-space: nowrap;

View File

@ -45,6 +45,10 @@
} }
} }
.main-navigation .sub-menu a {
opacity: inherit;
}
/* add focus state to social media icons */ /* add focus state to social media icons */
.social-navigation a { .social-navigation a {
&:focus { &:focus {

View File

@ -1190,6 +1190,7 @@ body.page .main-navigation {
color: #fff; color: #fff;
display: block; display: block;
line-height: 1.2; line-height: 1.2;
text-shadow: none;
padding: calc( .5 * 1rem) 1rem calc( .5 * 1rem) calc( 24px + 1rem); padding: calc( .5 * 1rem) 1rem calc( .5 * 1rem) calc( 24px + 1rem);
white-space: nowrap; white-space: nowrap;
} }
@ -2157,6 +2158,10 @@ body.page .main-navigation {
color: #fff; color: #fff;
} }
.site-header.featured-image .main-navigation .sub-menu a {
opacity: inherit;
}
.site-header.featured-image .social-navigation a:focus { .site-header.featured-image .social-navigation a:focus {
color: #fff; color: #fff;
opacity: 1; opacity: 1;

View File

@ -1190,6 +1190,7 @@ body.page .main-navigation {
color: #fff; color: #fff;
display: block; display: block;
line-height: 1.2; line-height: 1.2;
text-shadow: none;
padding: calc( .5 * 1rem) calc( 24px + 1rem) calc( .5 * 1rem) 1rem; padding: calc( .5 * 1rem) calc( 24px + 1rem) calc( .5 * 1rem) 1rem;
white-space: nowrap; white-space: nowrap;
} }
@ -2163,6 +2164,10 @@ body.page .main-navigation {
color: #fff; color: #fff;
} }
.site-header.featured-image .main-navigation .sub-menu a {
opacity: inherit;
}
.site-header.featured-image .social-navigation a:focus { .site-header.featured-image .social-navigation a:focus {
color: #fff; color: #fff;
opacity: 1; opacity: 1;

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.1-alpha-44367'; $wp_version = '5.1-alpha-44368';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.