Skip to content
Permalink
Browse files

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.
Merges [44368] to the 5.0 branch.
Fixes #45689.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@44427 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
SergeyBiryukov committed Jan 7, 2019
1 parent ffa3a4e commit 190ef35bc9f6f2a7f0ccfd9f4ed83f258010b07f
@@ -202,6 +202,7 @@
color: $color__background-body;
display: block;
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;
white-space: nowrap;

@@ -45,6 +45,10 @@
}
}

.main-navigation .sub-menu a {
opacity: inherit;
}

/* add focus state to social media icons */
.social-navigation a {
&:focus {
@@ -1221,6 +1221,7 @@ body.page .main-navigation {
color: #fff;
display: block;
line-height: 1.2;
text-shadow: none;
padding: calc( .5 * 1rem) 1rem calc( .5 * 1rem) calc( 24px + 1rem);
white-space: nowrap;
}
@@ -2195,6 +2196,10 @@ body.page .main-navigation {
color: #fff;
}

.site-header.featured-image .main-navigation .sub-menu a {
opacity: inherit;
}

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

.site-header.featured-image .main-navigation .sub-menu a {
opacity: inherit;
}

.site-header.featured-image .social-navigation a:focus {
color: #fff;
opacity: 1;

0 comments on commit 190ef35

Please sign in to comment.
You can’t perform that action at this time.