Philip M. Hofer (Frumph | 11 Jun 2012 06:13
Favicon
Gravatar

Problem with appearance -> background

The body class "custom-background" is staying even after clearing everything 
from the appearance -> background

<style type="text/css" id="custom-background-css">
body.custom-background { background-image: none; }
</style>

<body class="home blog logged-in admin-bar custom-background user-guest 
gecko am night morning mon layout-3c"> 
Jon Cave | 11 Jun 2012 10:37
Picon
Gravatar

Re: Problem with appearance -> background

On Mon, Jun 11, 2012 at 5:13 AM, Philip M. Hofer (Frumph)
<philip@...> wrote:
> The body class "custom-background" is staying even after clearing everything
> from the appearance -> background

Confirmed. I reopened http://core.trac.wordpress.org/ticket/20448 with a patch.

Thanks for the report.
Andrew Nacin | 11 Jun 2012 19:57
Gravatar

Re: Problem with appearance -> background

On Mon, Jun 11, 2012 at 4:37 AM, Jon Cave <jon@...> wrote:

> On Mon, Jun 11, 2012 at 5:13 AM, Philip M. Hofer (Frumph)
> <philip@...> wrote:
> > The body class "custom-background" is staying even after clearing
> everything
> > from the appearance -> background
>
> Confirmed. I reopened http://core.trac.wordpress.org/ticket/20448 with a
> patch.
>
> Thanks for the report.

Frumph —

Best I can tell, this is not actually a bug. I don't think you "cleared
everything" from Appearance > Background. You pressed "Remove Background
Image," but your theme registers a default image, either via the
BACKGROUND_IMAGE constant (old) or the default-image argument passed to
add_theme_support() (3.4).

As you "removed" that image, we have to print out a "background-image:
none", in order to override any background image references in the
stylesheet.

If your theme registers a default image, we are always going to print
body.custom-background.

But, if your theme does not register a default image and you do register a
default color, then there is a small bug: If you have no customizations at
(Continue reading)

Philip M. Hofer (Frumph | 11 Jun 2012 20:06
Favicon
Gravatar

Re: Problem with appearance -> background

Sorry champ, if it works that way then I will not support giving themes the 
default.

Bad programming.

Why?

Because no matter what happens, because of order of execution the 
custom-background and background-image: none; will ALWAYS overwrite it.

-----Original Message----- 
From: Andrew Nacin
Sent: Monday, June 11, 2012 10:57 AM
To: wp-testers@...
Subject: Re: [wp-testers] Problem with appearance -> background

On Mon, Jun 11, 2012 at 4:37 AM, Jon Cave <jon@...> wrote:

> On Mon, Jun 11, 2012 at 5:13 AM, Philip M. Hofer (Frumph)
> <philip@...> wrote:
> > The body class "custom-background" is staying even after clearing
> everything
> > from the appearance -> background
>
> Confirmed. I reopened http://core.trac.wordpress.org/ticket/20448 with a
> patch.
>
> Thanks for the report.

Frumph —
(Continue reading)

Philip M. Hofer (Frumph | 11 Jun 2012 20:13
Favicon
Gravatar

Re: Problem with appearance -> background

Sorry, didn't see your comment at the bottom about behavior being off

Expected behavior -

Theme registered a background color or image - custom-background class 
enabled printf of the background css.

Theme cleared of background color and image.   custom-background class 
doesn't exist AND printf of background css non-existant

Child Theme registered a background color or image - custom background class 
enabled and primary themes defaults replaced with child themes registration 
overrides in the printf of the background css

______________

If you test it, you will see that when you create "defaults" it overrides 
everything including any changes the end user might want to make, they are 
forever stuck with using appearance -> background.

Theme creators like myself, and I can only speak for myself in this regard 
see it as a potential boon to my theme to have the default background and 
color enabled in the appearance -> background.  But, unfortunately if a 
child theme is added to it - the main theme overrides anything the child 
themes look has immediately.    Regardless.   Its 'an extra setup step' to 
use the appearance -> background at that time, making the end user put the 
information into the appearance -> background just because it wasn’t 
programmed to replace info or be empty if removed.

-----Original Message----- 
(Continue reading)

Philip M. Hofer (Frumph | 11 Jun 2012 20:17
Favicon
Gravatar

Re: Problem with appearance -> background

To comment on:
 <at> Nacin:  As you "removed" that image, we have to print out a 
"background-image:
none", in order to override any background image references in the
stylesheet.

I want it to revert to the background references in the stylesheet.   ref: 
last email sent to thread, child themes overriding and execution css order.

-----Original Message----- 
From: Philip M. Hofer (Frumph)
Sent: Monday, June 11, 2012 11:13 AM
To: wp-testers@...
Subject: Re: [wp-testers] Problem with appearance -> background

Sorry, didn't see your comment at the bottom about behavior being off

Expected behavior -

Theme registered a background color or image - custom-background class
enabled printf of the background css.

Theme cleared of background color and image.   custom-background class
doesn't exist AND printf of background css non-existant

Child Theme registered a background color or image - custom background class
enabled and primary themes defaults replaced with child themes registration
overrides in the printf of the background css

______________
(Continue reading)

Otto | 11 Jun 2012 20:33
Favicon
Gravatar

Re: Problem with appearance -> background

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.

-Otto

On Mon, Jun 11, 2012 at 1:17 PM, Philip M. Hofer (Frumph)
<philip@...> wrote:
> To comment on:
>  <at> Nacin:  As you "removed" that image, we have to print out a
> "background-image:
>
> none", in order to override any background image references in the
> stylesheet.
>
> I want it to revert to the background references in the stylesheet.   ref:
> last email sent to thread, child themes overriding and execution css order.
>
Philip M. Hofer (Frumph | 11 Jun 2012 20:38
Favicon
Gravatar

Re: Problem with appearance -> background

True, but no matter what you do via plugin ( like theme companion or even a 
child theme ) because of order of execution, it will always be 
background-image: none;  when you remove the image that was default.

-----Original Message----- 
From: Otto
Sent: Monday, June 11, 2012 11:33 AM
To: wp-testers@...
Subject: Re: [wp-testers] Problem with appearance -> background

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.

-Otto

On Mon, Jun 11, 2012 at 1:17 PM, Philip M. Hofer (Frumph)
<philip@...> wrote:
> To comment on:
>  <at> Nacin:  As you "removed" that image, we have to print out a
> "background-image:
>
> none", in order to override any background image references in the
> stylesheet.
>
> I want it to revert to the background references in the stylesheet.   ref:
(Continue reading)

Andrew Nacin | 11 Jun 2012 20:44
Gravatar

Re: Problem with appearance -> background

On Mon, Jun 11, 2012 at 2:33 PM, Otto <otto@...> 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).

Nacin
(Continue reading)

Andrew Nacin | 11 Jun 2012 23:37
Gravatar

Re: Problem with appearance -> background

On Mon, Jun 11, 2012 at 2:44 PM, Andrew Nacin <wp@...> wrote:

> On Mon, Jun 11, 2012 at 2:33 PM, Otto <otto@...> 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.
>
(Continue reading)

Lorie Ann Jermoune | 13 Jun 2012 12:11
Picon
Favicon

Re: Problem with appearance -> background

I want more info about adding copyright to my website.  Maybe I missed something, though there were no
details or a plugin or anything//

I enjoy learning from you and from others offering me knowledge continuously!
Lorie Ann Jermounehttp://lorieannj.com/
http://twitter.com/lorieannjhttp://lorieannjermoune.com http://www.skillpages.com/lorie.jermoune 

--- On Mon, 6/11/12, Andrew Nacin <wp@...> wrote:

From: Andrew Nacin <wp@...>
Subject: Re: [wp-testers] Problem with appearance -> background
To: wp-testers@...
Date: Monday, June 11, 2012, 5:37 PM

On Mon, Jun 11, 2012 at 2:44 PM, Andrew Nacin <wp@...> wrote:

> On Mon, Jun 11, 2012 at 2:33 PM, Otto <otto@...> 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
(Continue reading)


Gmane