[wp-trac] [WordPress Trac] #40057: Double hashed value for background-color of body.background-color

WordPress Trac noreply at wordpress.org
Tue Feb 11 21:05:19 UTC 2025


#40057: Double hashed value for background-color of body.background-color
-------------------------------------+-----------------------
 Reporter:  hovhanneshovakimyan      |       Owner:  audrasjb
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  6.8
Component:  Themes                   |     Version:  4.7.3
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+-----------------------
Changes (by audrasjb):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59813" 59813]:
 {{{
 #!CommitTicketReference repository="" revision="59813"
 Themes: Avoid double hashed value for `background-color` in custom
 backgrounds.

 This changeset replaces the hardcoded hash symbol with running
 `maybe_hash_hex_color()` on the full `background-color` value provided via
 the custom background feature, so the hash is only added if it is needed.
 By doing so, if a theme developer sets a background color value that uses
 a hash (#), WordPress won't add an additional hash anymore when outputting
 the relevant CSS. Duplicate hash symbols (##) can break CSS background
 color declarations.

 Props hovhanneshovakimyan, joyously, poena,
 Fixes #40057.
 }}}

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


More information about the wp-trac mailing list