Opened 8 years ago
Closed 8 years ago
#39270 closed defect (bug) (fixed)
Use a higher priority on wp_head for inline custom CSS
Reported by: | jeremyfelt | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.7.1 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Customize | Keywords: | has-patch commit fixed-major |
Focuses: | Cc: |
Description
As of [38829], via #35395, custom CSS is output inline on wp_head
with a priority of 11.
Other themes, well at least one, may also use priority 11 to output inline CSS for the same reasoning as our commit message - "so that it overrides any enqueued stylesheets". Because of the order in which these are added, the "overriding" custom CSS from WordPress it output before the additional theme styles.
The Jetpack solution, before WP 4.7, was to use priority 101 so that the styles were more likely to output last.
Because of the priority shifting/confusion, the upgrade to WordPress 4.7 caused visual regressions on the front end for at least 2 sites that I'm aware of.
If it's not too late, I'd like to suggest bumping this priority to something that fires even later, say 99.
Attachments (1)
Change History (12)
#2
@
8 years ago
- Owner set to westonruter
- Status changed from new to accepted
I agree it should be changed sooner than later. Following Jetpack's lead on the priority is probably the way to go.
This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.
8 years ago
#8
@
8 years ago
+1, looks good. I think @jeherve said we've had some remarks from users as well. Good change.
I'm going to bump this to 4.7.1 for consideration. If it's not handled there, then it may be too much of a breaking change to handle in 4.8 or later.