[wp-trac] [WordPress Trac] #62731: Inline CSS inserted by wp_print_auto_sizes_contain_css_fix too high in HTML

WordPress Trac noreply at wordpress.org
Wed Jun 11 01:13:40 UTC 2025


#62731: Inline CSS inserted by wp_print_auto_sizes_contain_css_fix too high in HTML
---------------------------------------------------+---------------------
 Reporter:  superpoincare                          |       Owner:  (none)
     Type:  enhancement                            |      Status:  new
 Priority:  normal                                 |   Milestone:  6.9
Component:  Media                                  |     Version:  6.7.1
 Severity:  minor                                  |  Resolution:
 Keywords:  has-patch needs-testing has-test-info  |     Focuses:
---------------------------------------------------+---------------------

Comment (by westonruter):

 @joemcgill Thanks for that feedback. You're right that the exiting
 function can be used to enqueue the inline style rather than to print it.
 The name is a bit misleading, but that's par for the ''core''.

 I've [https://github.com/WordPress/wordpress-
 develop/pull/8954/commits/e7144a3652f8888b1690db58acf361e4d0093912
 updated] the [https://github.com/WordPress/wordpress-develop/pull/8954 PR]
 to eliminate the function deprecation.

 I think it makes sense to still try to print the CSS early to preserve the
 CSS cascade. If it were printed later, then it could unintentionally
 override another style rule that is setting the `contain-intrinsic-size`
 style.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62731#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list