[wp-trac] [WordPress Trac] #61531: HTML API: Audit class name methods for consistency and correctness

WordPress Trac noreply at wordpress.org
Wed Jul 17 00:11:09 UTC 2024


#61531: HTML API: Audit class name methods for consistency and correctness
--------------------------------------+-----------------------------
 Reporter:  jonsurrell                |       Owner:  (none)
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  Future Release
Component:  HTML API                  |     Version:  6.5
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------

Comment (by dmsnell):

 In [changeset:"58740" 58740]:
 {{{
 #!CommitTicketReference repository="" revision="58740"
 HTML API: Remove leading whitespace after removing class names.

 In part of a larger review of CSS semantics and behaviors, this patch
 takes the opportunity to remove leading whitespace in an updated class
 attribute after the first class in the attribute has been removed.

 Previously, if the first class name had been removed, the whitespace
 that formerly followed it would remain in the class attribute. This
 stood in contrast to removing other class names, which removed their
 associated whitespace.

 There should be no semantic or functional changes in this patch, only
 a slightly-large diff for modified HTML documents that looks prettier
 when removing the first class name in a class attribute.

 Developed in https://github.com/WordPress/wordpress-develop/pull/6933
 Discussed in https://core.trac.wordpress.org/ticket/61531

 Props dmsnell, jonsurrell.
 See #61531.
 }}}

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


More information about the wp-trac mailing list