wp_customize_support_script() concatenates class names, breaking CSS — at Version 2
|Reported by:||beaulebens||Owned by:|
Description (last modified by SergeyBiryukov)
When wp_customize_support_script() runs, it removes 'no-customize-support' from the list of classes applied to the body tag.
The regular expression used to match that class includes whitespace either side of the class name, and then replaces the entire thing with ''.
This results in concatenation of any previously-adjacent classes, which in turn can leave you with a body class looking something like this:
home blog logged-in admin-barcustom-background default-menu no-customize-support debug-bar-maximized customize-support
Note: admin-barcustom-background, which breaks any CSS applied to either of those classes.
Instead of replacing with '', just replace with ' ', which will leave a space and thus leave both classes being valid.