[wp-trac] [WordPress Trac] #52780: Twenty Twenty-One: Code tag shows outside of section area

WordPress Trac noreply at wordpress.org
Thu Mar 11 16:42:59 UTC 2021


#52780: Twenty Twenty-One: Code tag shows outside of section area
---------------------------+------------------------------
 Reporter:  ravipatel      |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:  2nd-opinion    |     Focuses:  ui, css
---------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:   => 2nd-opinion


Comment:

 This happens because the `max-width` does not apply to the inline `code`
 element. If we want to support this in Twenty Twenty-One and/or Twenty
 Twenty, we would need to set the element to `block`:
 {{{
 .entry-content > code {
     display: block;
 }
 }}}

 (related: ticket:48734#comment:11)

 However, wrapping the `code` tag inside either `pre` or `div` aligns it
 properly.

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


More information about the wp-trac mailing list