Opened 4 months ago
Closed 2 months ago
#62120 closed defect (bug) (invalid)
Removing Global Styles
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.6.2 |
Component: | General | Keywords: | close |
Focuses: | Cc: |
Description
I am creating a bespoke theme and using wp_dequeue_style( 'global-styles' ) in the wp_enqueue_scripts to remove the #global-styles-inline-css style tag from the document head. Whilst this works normally, I have found the following steps break it:
On a page, add a buttons block, add a button, setting its style to outline.
Now save the page and examine the HTML source.
You will find that the #global-styles-inline-css style tag is now output - not in the head but in the wp_footer() location (note theme must implement this to reproduce the bug).
Adding and removing wp_dequeue_style( 'global-styles' ) now simply moves the <script> tag between the header and footer.
Expected behaviour would be for the <script> tag to have been completely removed regardless of page content.
Attachments (1)
Change History (3)
#1
@
4 months ago
- Component changed from Themes to General
- Keywords close added
Hi @mgcwebsites and welcome to WordPress trac!
Bugs and feature requests related to global styles, the blocks and the editors are managed in the Gutenberg GitHub repository. Please search there before opening a new issue. Once the issue is moved to GitHub, this ticket can be closed.
#2
@
2 months ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
@mgcwebsites if you are still experiencing this issue please report this on the GitHub repo as @poena advised. Due to the length of time that has passed I hope that you are no longer experiencing it so will for now close this ticket. If you do however still experience it you can open up an issue right there on that repo and contributors will help you. Thanks.
A theme that will let you test the issue in isolation