[wp-trac] [WordPress Trac] #55229: Super broad selector for images max-width on WP 5.9

WordPress Trac noreply at wordpress.org
Tue Feb 22 22:00:26 UTC 2022


#55229: Super broad selector for images max-width on WP 5.9
--------------------------+-----------------------------
 Reporter:  hvianna       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:  5.9.1
 Severity:  normal        |   Keywords:
  Focuses:  css           |
--------------------------+-----------------------------
 I recently updated to WP 5.9 and noticed some undesired behavior on images
 in my custom theme, caused by the CSS declaration below (from `./wp-
 includes/css/dist/block-library/style.min.css`):

 {{{
 html :where(img) {
     height: auto;
     max-width: 100%;
 }
 }}}

 This causes images that would previously overflow a smaller container to
 be "squished" inside it now. Any reason to use such a broad selector on
 core??

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55229>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list