Disabled tree shaking in Customizer causes stylesheet exclusions #6787
Labels
Bug
Something isn't working
Changelogged
Whether the issue/PR has been added to release notes.
P0
High priority
Sandboxing Experiment
Milestone
Bug Description
I discovered a regression when testing Twenty Fifteen as a Reader theme. When I opened the AMP Customizer, I saw the theme without any styling:
I see the same thing if I view the changeset preview link (
https://wordpress-stable.lndo.site/hello-world/?amp=1&customize_changeset_uuid=9c4fa0b0-3e3a-48a3-92a6-90b2812802e6
)If I validate that changeset preview I see the stylesheets as follows:
Note that two are being excluded. No tree shaking is being performed:
It is expected that tree-shaking is disabled in the Customizer preview, as Customizer scripts required dynamic style rules. What is not expected, however, is that stylesheets are getting excluded.
I can also reproduce this issue in Twenty-Twenty One and Twenty Twenty.
It does not happen in Standard mode because excessive CSS is kept by default in Standard mode.
Expected Behaviour
Excessive CSS should be kept by default in the Customizer preview.
Screenshots
No response
PHP Version
No response
Plugin Version
2.2
AMP plugin template mode
Transitional, Reader
WordPress Version
No response
Site Health
No response
Gutenberg Version
No response
OS(s) Affected
No response
Browser(s) Affected
No response
Device(s) Affected
No response
Acceptance Criteria
No response
Implementation Brief
No response
QA Testing Instructions
No response
Demo
No response
Changelog Entry
No response
The text was updated successfully, but these errors were encountered: