From 5112fe565a4ce0dfbdce0ca8d65ee8a595516250 Mon Sep 17 00:00:00 2001 From: Matt Thomas Date: Fri, 6 Dec 2013 21:22:14 +0000 Subject: [PATCH] Provide a default generic avatar icon in the My Account menu if avatars are disabled, ensuring that the link is visible at responsive sizes. See #25858. git-svn-id: https://develop.svn.wordpress.org/trunk@26744 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/colors/_admin.scss | 6 +++++- src/wp-includes/css/admin-bar.css | 26 +++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/css/colors/_admin.scss b/src/wp-admin/css/colors/_admin.scss index a070192a86..b1046e4832 100644 --- a/src/wp-admin/css/colors/_admin.scss +++ b/src/wp-admin/css/colors/_admin.scss @@ -260,7 +260,8 @@ ul#adminmenu > li.current > a.current:after { #wpadminbar .ab-icon, #wpadminbar .ab-icon:before, -#wpadminbar .ab-item:before { +#wpadminbar .ab-item:before, +#wpadminbar .ab-item:after { color: $menu-icon; } @@ -282,6 +283,7 @@ ul#adminmenu > li.current > a.current:after { #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, +#wpadminbar li:hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { color: $menu-highlight-icon; } @@ -324,6 +326,8 @@ ul#adminmenu > li.current > a.current:after { #wpadminbar li .ab-item:focus:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, +#wpadminbar li:hover .ab-item:after, +#wpadminbar li.hover .ab-item:after, #wpadminbar li:hover #adminbarsearch:before { color: $menu-submenu-focus-text; } diff --git a/src/wp-includes/css/admin-bar.css b/src/wp-includes/css/admin-bar.css index 37997633d2..fcd5fe30d2 100644 --- a/src/wp-includes/css/admin-bar.css +++ b/src/wp-includes/css/admin-bar.css @@ -232,6 +232,11 @@ #wpadminbar .ab-item:before, #wpadminbar #adminbarsearch:before { color: #999; +} + +#wpadminbar .ab-icon:before, +#wpadminbar .ab-item:before, +#wpadminbar #adminbarsearch:before { position: relative; -moz-transition: all .1s ease-in-out; -webkit-transition: all .1s ease-in-out; @@ -356,6 +361,19 @@ min-width: 198px; } +#wp-admin-bar-my-account > .ab-item:before { + content: "\f110"; + top: 2px; + float: right; + margin-left: 6px; + margin-right: 0; +} + +#wp-admin-bar-my-account.with-avatar > .ab-item:before { + display: none; + content: none; +} + #wp-admin-bar-my-account.with-avatar > ul { min-width: 270px; } @@ -784,7 +802,8 @@ /* My Sites and "Site Title" menu */ #wpadminbar #wp-admin-bar-my-sites > .ab-item, #wpadminbar #wp-admin-bar-site-name > .ab-item, - #wpadminbar #wp-admin-bar-edit > .ab-item { + #wpadminbar #wp-admin-bar-edit > .ab-item, + #wpadminbar #wp-admin-bar-my-account > .ab-item { text-indent: 100%; white-space: nowrap; overflow: hidden; @@ -803,13 +822,14 @@ #wpadminbar #wp-admin-bar-edit > .ab-item:before, #wpadminbar #wp-admin-bar-my-sites > .ab-item:before, - #wpadminbar #wp-admin-bar-site-name > .ab-item:before { + #wpadminbar #wp-admin-bar-site-name > .ab-item:before, + #wpadminbar #wp-admin-bar-my-account > .ab-item:before { display: block; text-indent: 0; font: normal 32px/1 'dashicons'; speak: none; top: 7px; - width: 50px; + width: 55px; text-align: center; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;