[wp-trac] [WordPress Trac] #58463: Custom HTML block preview not same as the Frontend Views (was: Twenty Fourteen: Custom HTML block preview not same as the Frontend Views)

WordPress Trac noreply at wordpress.org
Sat Jun 10 07:32:13 UTC 2023


#58463: Custom HTML block preview not same as the Frontend Views
----------------------------------+--------------------------------------
 Reporter:  algorithmsunlocks     |       Owner:  (none)
     Type:  defect (bug)          |      Status:  new
 Priority:  normal                |   Milestone:  Awaiting Review
Component:  Editor                |     Version:
 Severity:  normal                |  Resolution:
 Keywords:  move-to-github close  |     Focuses:  ui, css, administration
----------------------------------+--------------------------------------
Changes (by sabernhardt):

 * keywords:  has-patch => move-to-github close
 * component:  Bundled Theme => Editor


Comment:

 This is an editor problem that can happen with any theme.

 All direct child elements inside the block preview's `div` have no margin.
 {{{
         body > div > * {
                 margin-top: 0 !important; /* Has to have !important to
 override inline styles. */
                 margin-bottom: 0 !important;
         }
 }}}

 (from
 [https://github.com/WordPress/gutenberg/blob/d921d2a34d52383f78a970fa1d8a76a1b9f361c1/packages/components/src/sandbox/index.tsx#L109-L112
 sandbox/index.tsx])

 If you could, please open an issue on the
 [https://github.com/WordPress/gutenberg/issues/new/choose Gutenberg
 repository].

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


More information about the wp-trac mailing list