After the automatic update to wordpress 5.8 today one of my custom themes displayed wrong styling in the frontend for custom webfonts, colors, font-sizes and other styles. After a quick check in the dev tools I realized that this is caused by common.min.css
an automatically generated collection of core styles that hasn’t been present in WordPress 5.7.2 (I quickly reverted the live site from 5.8 to 5.7.2). On localhost I kept the updated (5.8) version to find a solution for the problem. If I deactivate common.min.css
in the browser’s dev tools everything looks fine again.
Is there a way to deregister this core style on frontend? I have tried to get my grips on deactivating unnecessary styles for hours and days in the past but haven’t been successful so far – to be honest.
I have found some possibly related information in this recent wordpress.org blog post:
https://make.wordpress.org/core/2021/07/01/block-styles-loading-enhancements-in-wordpress-5-8/#respond but I am not 100 % sure if this relates to my problem and even if so I haven’t found a solution in the post.
Ari mentions in the post that block styles (which I suppose are combined into common.min.css
) are loaded in the footer using print_late_styles()
and that for classic, php-based themes (which my theme is – in contrast to the new block themes) this causes conflicts with the priority of the styles / stylesheets load order.
Any help or advise really appreciated as I need to find a quick solution (and maybe others are facing the same problem?)