[wp-trac] [WordPress Trac] #58485: Twenty Twenty-Three: Inline CSS - Unit of measure is redundant

WordPress Trac noreply at wordpress.org
Mon Jun 19 11:06:58 UTC 2023


#58485: Twenty Twenty-Three: Inline CSS - Unit of measure is redundant
---------------------------+----------------------------------------------
 Reporter:  ankitmaru      |       Owner:  SergeyBiryukov
     Type:  defect (bug)   |      Status:  reopened
 Priority:  normal         |   Milestone:  6.3
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  css, template, coding-standards
---------------------------+----------------------------------------------

Comment (by poena):

 Hi

 This does not cause any validation errors for the block markup in the
 editor, but I would prefer for it to be reverted:

 1) The values in the block comment and the {{{style}}} attribute needs to
 match. It did not cause a block validation ''this time'', but if it had
 been a different block attribute like class name or tag name, the mismatch
 would have caused an error.

 2) The block control does not accept unitless values. If we would solve
 the mismatch and remove the unit from both the comment and the markup,
 then the block control
 in the editor would not display the correct value. I believe this may be
 why the unit is not removed by the editor when it prepares the CSS.

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


More information about the wp-trac mailing list