Menus: Visually hide the menu item edit link text in a consistent way.

Fixes a visual glitch visible on Ubuntu. WordPress uses system fonts and they have
different metrics across operating systems. Uses screen-reader-text as a more
solid way to visually hide text.

Props punit5658, afercia.
Fixes #41497.


git-svn-id: https://develop.svn.wordpress.org/trunk@41227 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia
2017-08-03 22:12:01 +00:00
parent 1e9777c220
commit babec6d399
3 changed files with 12 additions and 11 deletions

View File

@@ -581,11 +581,7 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
display: block;
width: 30px;
height: 40px;
margin-right: 0 !important;
text-indent: 100%;
outline: none;
overflow: hidden;
white-space: nowrap;
}
.no-js.nav-menus-php .item-edit {
@@ -593,13 +589,19 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
float: right;
width: auto;
height: auto;
margin-right: -10px !important;
padding: 12px 0;
margin: 12px -10px 12px 0;
padding: 0;
color: #0073aa;
text-decoration: underline;
font-size: 12px;
line-height: 18px;
text-indent: 0;
}
.no-js.nav-menus-php .item-edit .screen-reader-text {
position: static;
width: auto;
height: auto;
margin: 0;
}
.nav-menus-php .item-edit:before {
@@ -618,7 +620,7 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
text-indent: 1px; /* account for the dashicon alignment */
}
.nav-menus-php .item-edit:focus {
.js.nav-menus-php .item-edit:focus {
box-shadow: none;
}