[wp-trac] [WordPress Trac] #52589: Twenty Twenty-One: Paragraph padding isn’t inherited in some div

WordPress Trac noreply at wordpress.org
Fri Feb 26 07:42:42 UTC 2021


#52589: Twenty Twenty-One: Paragraph padding isn’t inherited in some div
---------------------------+------------------------------
 Reporter:  ooker          |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:  5.6.1
 Severity:  major          |  Resolution:
 Keywords:                 |     Focuses:  ui, css
---------------------------+------------------------------

Comment (by poena):

 Hi

 I have asked for input from others.

 {{{
 <div class="wp-custom-block-wrapper-class inner-container">
 <div class="wp-custom-block-inner-class inner-container"> <-- Receives
 bottom margin only, as the first child of inner-container
 }}}
 {{{
 <h3>Block Title</h3> <-- Receives bottom margin only, as the first child
 of inner-container
 }}}
 {{{
 <p>Middle paragraph.</p> <--Receives both top and bottom margin, as a
 child of inner-container
 }}}
 {{{
 <p>Block paragraph.</p> <-- Receives top margin only, as the last child of
 inner-container
 </div>
 }}}
 {{{
 <div class="wp-custom-block-inner-class inner-container"> <-- Receives top
 margin only, as the last child of inner-container
 }}}
 {{{
 <h3>Another Block Title</h3> <-- Receives bottom margin only, as the first
 child of inner-container
 <p>Another Block paragraph.</p>  <-- Receives top margin only, as the last
 child of inner-container
 </div>
 }}}


 Meanwhile, consider that this is my personal ''opinion''.
 As plugin developers we usually don't know what theme is installed
 together with the plugin.
 It can be a theme build two years ago that has no block styles at all, or
 a theme built only for a specific page builder.
 To make sure that plugin output looks good with **any** theme, the plugin
 needs to include its own basic styles.
 That is why I would not recommend adjusting a plugin for one specific
 theme, even if it is a default theme.

 And on the other hand there are plugins that needs to provide both markup
 and styles for all themes, and additional support for some default themes.
 (Example: https://github.com/woocommerce/woocommerce/tree/trunk/includes
 /theme-support,
 https://github.com/woocommerce/woocommerce/blob/trunk/assets/css/twenty-
 twenty-one.scss)

 This is because the default theme can not include support for specific
 plugins:
 -It is unfair when not all plugins can be supported equally
 -What happens when plugin A needs 28px, but plugin B needs 1.7em?

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


More information about the wp-trac mailing list