[wp-trac] [WordPress Trac] #30299: Inconsistent custom-background Body Class Behavior

WordPress Trac noreply at wordpress.org
Thu Dec 4 21:57:31 UTC 2014


#30299: Inconsistent custom-background Body Class Behavior
-------------------------------+------------------------------
 Reporter:  philiparthurmoore  |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Customize          |     Version:
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by philiparthurmoore):

 Hi!

 Replying to [comment:3 boonebgorges]:
 > ...if an admin has explicitly chosen to set a value for the background
 color, then it shouldn't matter what that color is. Presumably, you are
 then using the '.custom-background' class (or the lack thereof) to do some
 style overrides, and I would argue that you ought not to be doing these
 overrides if the admin has explicitly declared the color.

 This is certainly understandable, but here's my thinking when I change
 background colors:

 1. Activate a new theme.
 2. Change the background color just to see what it would look like,
 playing around.
 3. Change things back to normal (default state, not customized).
 4. Expect things to be the way that they were before I changed my site to
 have a custom background color. This isn't possible if a theme leverages
 `custom-background` as it is now.

 As it stands now, `custom-background` isn't a reliable helper class to
 figure out when a background has truly been customized. A background that
 is the same as a default hasn't really been customized. But you are
 totally right that it has been set by a user and then put back to normal.
 But I would think that in this case a user wants things to go back to the
 way they were before they set a custom background color. This is at least
 how I deal with it.

 So if the logic for `custom-background` cannot be updated, would there be
 a case for `customized-background` as a new class? We need a way to figure
 out when a background has truly been customized away from the default and
 at present there does not appear to be a way to do that.

 Thanks!

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


More information about the wp-trac mailing list