Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Admin bar: Keep the WordPress.com logo and site name icon working with the SVG admin bar icons of WordPress 7.2.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
*/
#wpadminbar li#wp-admin-bar-wp-logo {
display: block !important;

> .ab-item .ab-icon {
width: revert;
}
}

/**
Expand Down Expand Up @@ -53,38 +49,42 @@
/**
* WP logo menu
*/
#wpadminbar .quicklinks #wp-admin-bar-wp-logo > .ab-item {
padding: 0 10px;

@media (max-width: 782px) {
padding: 0;
}
}

#wpadminbar .quicklinks #wp-admin-bar-wp-logo > .ab-item .ab-icon {
margin-right: 0 !important;
}

// The logo is drawn on `::before`, which fills the icon slot.
// On WordPress 7.2+, it also pushes core's SVG icon out of view.
// TODO: Remove this rule once all WordPress.com sites run WordPress 7.2+,
// whose SVG icon is the same logo at the same size.
#wpadminbar .quicklinks #wp-admin-bar-wp-logo > .ab-item .ab-icon::before {
display: flex;
content: "";
width: 20px;
height: 20px;
background-color: currentColor;
// SVG is from https://github.com/Automattic/gridicons/blob/f5b4c69fafc2a395aebce4500cb4f22d7c005745/php/gridicons.php#L380
mask-image: url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iZ3JpZGljb24gZ3JpZGljb25zLW15LXNpdGVzIiBoZWlnaHQ9IjI0IiB3aWR0aD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDI0IDI0Ij48Zz48cGF0aCBkPSJNMTIgMkM2LjQ3NyAyIDIgNi40NzcgMiAxMnM0LjQ3NyAxMCAxMCAxMCAxMC00LjQ3NyAxMC0xMFMxNy41MjMgMiAxMiAyek0zLjUgMTJjMC0xLjIzMi4yNjQtMi40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A4LjQ5MyAwIDAxLTQuMjI3IDcuMzQ3eiIvPjwvZz48L3N2Zz4=);
mask-position: center;
mask-repeat: no-repeat;
top: 2px;

@media (max-width: 782px) {
width: 32px;
height: 32px;
margin: 0 10px;
mask-size: cover;
top: 7px;
mask-size: 32px;
}
}

// WordPress 7.1 and older have a Dashicons icon slot: size it for a 40px
// item, as before WordPress 7.2.
// TODO: Remove this rule once all WordPress.com sites run WordPress 7.2+.
#wpadminbar .quicklinks #wp-admin-bar-wp-logo > .ab-item .ab-icon:not(.svg-icon) {

@media (min-width: 783px) {
width: 26px;
margin-right: 0 !important;
}

&::before {
display: block;

@media (max-width: 782px) {
top: 7px;
}
}
}

#wpadminbar .quicklinks #wp-admin-bar-wp-logo:not(:first-child) {
Expand All @@ -94,23 +94,11 @@
>.ab-item .ab-icon {
width: 44px;
}

>.ab-item .ab-icon::before {
margin: 0 7px;
}
}
}

#wpadminbar .quicklinks #wp-admin-bar-site-name {

&:not(.has-site-icon) > .ab-item::before {

/**
* Always show the House icon by the site name.
*/
content: "\f102" !important;
}

@media (max-width: 480px) {

> a.ab-item,
Expand Down
Loading