Change Site Icon Background Color in Fullscreen Mode

Home WordPress Change Site Icon Background Color in Fullscreen Mode

December 9, 2022

In this WordPress tutorial, I will show you how to change the black background color for the site icon button while in Fullscreen mode. For some reason WordPress has defaulted this background color to black. This can cause problems if your site icon is also dark.

Timestamps:

  • 0:00 Introduction
  • 1:23 WordPress Tutorial Begins

Code Credit:
https://rudrastyh.com/gutenberg/custom-logo-in-fullscreen-mode.html

Code Snippets Plugin:
https://wordpress.org/plugins/code-snippets/

PHP Code Snippet

				
					add_action( 'admin_head', 'site_icon_style' );

function site_icon_style(){	
	$screen = get_current_screen();
	if( ! $screen->is_block_editor ) {
		return;
	}
	echo '<style>
	.edit-post-fullscreen-mode-close.has-icon{background-color:#fff!important;border-bottom:1px solid #e0e0e0}
    .edit-post-fullscreen-mode-close.components-button:before{box-shadow:none;}
	</style>';

}
				
			

*Some of the links on this page are affiliate links, meaning we may receive a commission if you follow them. This allows us to continue providing free content and educational resources for you. Thank you for supporting our small business!

More Free Resources

Join Our Community

Join now to receive helpful resources, tips, and tutorials in your inbox.

Is it time for a website upgrade?

Is it time for a website upgrade?

Are you giving off the right first impression? Take the quiz to find out how your site measures up.