[wp-testers] Problem with appearance -> background
wp at andrewnacin.com
Mon Jun 11 18:44:44 UTC 2012
On Mon, Jun 11, 2012 at 2:33 PM, Otto <otto at ottodestruct.com> wrote:
> It sorta strikes me that if you're using custom background
> functionality, then you shouldn't have any background image references
> in the main stylesheet. You should instead define a default image with
> the custom background code.
> Like, maybe a user doesn't want a background image and just wants a
> solid color instead. Selecting "no image" is a valid selection too.
This is why 3.4 will actually issue a background-image: none; when there is
a registered default but the user does not want a background --- in order to
override any stylesheet values.
With regards to child themes, if a child theme wants to override a parent
theme's default settings, then they should be doing it via PHP, not via CSS.
That means either calling add_theme_support() and setting default-image
to its own value (or to false), or calling remove_theme_support().
If we make it clear that default background images should *not* be specified
in CSS, then we can just remove the "background-image: none" stuff,
and it would allow a child theme to provide a CSS background-image as long
as the user also presses "Remove Background Image" in Appearance.
That would make http://core.trac.wordpress.org/ticket/20132 invalid,
would simplify some of our logic, would probably be less of a backwards
compatibility risk, and would avoid stomping on custom CSS (even though
the child theme should probably be using the API properly).
More information about the wp-testers