[wp-trac] [WordPress Trac] #50418: Twenty Twenty: Inline Images displaying as block

WordPress Trac noreply at wordpress.org
Thu Dec 3 10:33:05 UTC 2020


#50418: Twenty Twenty: Inline Images displaying as block
-------------------------------------------------+-------------------------
 Reporter:  mrfoxtalbot                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Bundled Theme                        |     Version:  5.4.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-       |     Focuses:  css
  refresh 2nd-opinion                            |
-------------------------------------------------+-------------------------
Changes (by sabernhardt):

 * keywords:  has-patch needs-testing => has-patch needs-testing needs-
     refresh 2nd-opinion
 * focuses:   => css
 * milestone:  Awaiting Review => Future Release


Comment:

 @thimalw Thanks for contributing a patch! Because Twenty Twenty has
 mirrored versions of stylesheets for right-to-left languages, the extra
 selector would need to be added in the style-rtl.css file as well. Then
 you can make a patch with both files together.

 Regarding the selector, I'm unsure whether it should include the `.entry-
 content` part. If someone has defined one of the following types of styles
 (either in a child theme or in the customizer's Additional CSS), the more
 specific `.entry-content p img` would override that.

 {{{
 /* case: <p class="hidden-images"><img /></p> */
 /* or case: <div class="hidden-images"><p><img /></p></div> */
 .hidden-images img {
         display: none;
 }
 /* case: <p><img class="hidden-image" /></p> */
 .hidden-image {
         display: none;
 }
 }}}

 Of course, these are likely rare situations, but it can happen.

 I think this could be safer, even though it also applies to any images in
 paragraph tags outside the post content area.

 {{{
 p img,
 .entry-content li img {
         display: inline-block;
 }
 }}}

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


More information about the wp-trac mailing list