[wp-trac] [WordPress Trac] #13763: margin and padding settings can result in awkward background image handling

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 10 15:01:19 UTC 2010


#13763: margin and padding settings can result in awkward background image handling
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:                    
     Type:  defect (bug)       |      Status:  new               
 Priority:  normal             |   Milestone:  3.0               
Component:  Themes             |     Version:  3.0               
 Severity:  normal             |    Keywords:  close dev-feedback
-------------------------------+--------------------------------------------

Comment(by nacin):

 You have the margin of your wrapper messing with the position of the body
 element.

 I've very rarely seen the html element in use for background images, and
 usually that is only when a technique is used to use both tags together.
 Importantly, I'd think we need to make sure we're definitely replacing
 existing background declaration, which in 99.5% of themes will be on the
 body element.

 Food for thought, this is from the CSS1 spec. http://www.w3.org/TR/REC-
 CSS1/#the-canvas
 ----
 HTML extensions have set a precedent for the second question: attributes
 on the 'BODY' element set the background of the whole canvas. To support
 designers' expectations, CSS1 introduces a special rule to find the canvas
 background:

 If the 'background' value of the 'HTML' element is different from
 'transparent' then use it, else use the 'background' value of the 'BODY'
 element. If the resulting value is 'transparent', the rendering is
 undefined.
 This rule allows:

 <HTML STYLE="background: url(http://style.com/marble.png)">
 <BODY STYLE="background: red">
 In the example above, the canvas will be covered with "marble". The
 background of the 'BODY' element (which may or may not fully cover the
 canvas) will be red.

 Until other means of addressing the canvas become available, it is
 recommended that canvas properties are set on the 'BODY' element.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13763#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list