[wp-trac] [WordPress Trac] #63374: theme.json: fix wrong padding value

WordPress Trac noreply at wordpress.org
Thu May 1 02:45:29 UTC 2025


#63374: theme.json: fix wrong padding value
--------------------------+-----------------------------
 Reporter:  wildworks     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:  good-first-bug
  Focuses:                |
--------------------------+-----------------------------
 Although the value of the `styles.elements.spacing.padding` property is an
 object type, a string is defined.

 This certainly works, but we must define each of the four directions
 separately based on the schema, otherwise the code editor will throw a
 validation error:

 {{{
 "spacing": {
         "padding": {
                 "top": "calc(0.667em + 2px)",
                 "right": "calc(1.333em + 2px)",
                 "bottom": "calc(0.667em + 2px)",
                 "left": "calc(1.333em + 2px)"
         }
 },
 }}}

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


More information about the wp-trac mailing list