Opened 16 years ago
Closed 16 years ago
#17102 closed enhancement (duplicate)
Custom background color has no effect if background: is specified in style.css
| Reported by: | pseudoxiah | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | 3.1.1 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
Description
The custom background callback built in WordPress generates the CSS for solid color like this:
body {
background-color:#000;
}
However this has no effect if in style.css a background image is specified like this:
body {
background:url(images/bg.png);
}
The patch added to this ticket resolves this by adding all custom background properties in a single background: declaration.
Attachments (1)
Change History (7)
#4
@
16 years ago
- Cc added
Note that the shorthand background resets much more. The patch would affect properties which are not covered by the backend options, like background-size, background-clip and background-origin.
It is up to the theme author to know and to handle the current way WP inserts the background properties. If it doesn’t fit, you can already use your own callback function. I see no need to fix anything.
#5
@
16 years ago
I wasn't able to find a workaround for solid color backgrounds in the current state. If a theme really needs the background-size, background-clip and background-origin attributes they can be declared with !important, although their usage on the body element and especially on a custom background image is pretty subjective.
Looks like a good addition to me!