Opened 7 years ago
Last modified 5 years ago
#40057 new defect (bug)
Double hashed value for background-color of body.background-color
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7.3 |
Component: | Themes | Keywords: | |
Focuses: | Cc: |
Description
The problem is that body.custom-background has background-color property which gets double hashed value.
So if theme is supporting custom background features, then you'll get wrong (double hashed) background-color value all the time.
I have already found the cause of the problem.
Check this file:
wp-includes/theme.php
on line: 1564
change this:
$style = $color ? "background-color: #$color;" : ;
to this:
$style = $color ? "background-color: $color;" : ;
That will solve the problem.
Note: See
TracTickets for help on using
tickets.
This still exists in 5.1, although it's only a problem if the theme tries to handle the color separately.
Possible fix (line 1633 of theme.php from 5.1):
$style = $color ? 'background-color: ' . maybe_hash_hex_color( $color ) . ';' : '';