RE: XP> Margins, borders, padding, and backgrounds

From: Kojima Shoji (Kojima.Shoji@exc.epson.co.jp)
Date: Wed Sep 27 2006 - 18:13:45 EDT

  • Next message: Kojima Shoji: "RE: XP> [CSS Paged Media] Margin Boxes and the Page Border"

    Hello Melinda-san,
     
    Here is the Epson comment you pointed out, however for some issues I may misunderstanding or not understanding well
     
    I'd like to share my new-and-improved understanding based on discussions within the CSS WG: ;-)
        <Following comments is Epson current understanding for the first 4 bullets part in your original mail>
    'html' is container for the document and its style properties should not be effective.
    Epson understands this because 'display' property of 'html' is not defined for CSS-PP Enhanced explicitly.
    It should be treated as 'inline' and it causes inconsistency.

    And here is the Epson's comment for other bullets.
    Is a font property set ....
    Epson agree with your proposal.
     
    * Do the html and page margins collapse? [no]
    As I mentioned as above, Epson thinks style property of 'html' does not have meaning.
    So Epson feels this question may have no meanings. For these issues we may need more clarifications.
     
    * Are html and body borders closed at the bottom of each page...
    Basically Epson agree with this. Epson would like to know how specification describe this.
     
    * Does a background property set within an @page rule get applied to the page margins? [Yes] To the page area unless obscured by html, body, or other backgrounds? [????, under discussion]
    Epson agrees with this description.
     
    * On the last page of a document, do the html and body properties terminate immediately after the last content, or at the bottom of the page (e.g., do the html and body margins get drawn right below the last paragraph, or at the bottom of the page? [Immediately after content.]
    I could not understand this clearly. Epson thinks it should treated as box model definition.
    Do you intend such clarification?
     
    * Similarly, on the last page, do the page bg, border, etc. extend to the bottom of the page, or terminate after the last content? [bottom of the page]
    Epson agree with your understanding.
     
    Sorry for my late response.
     
    Best Regards.

    ---
    Shoji KOJIMA
     
    

    -----Original Message----- From: owner-xp@pwg.org [mailto:owner-xp@pwg.org] On Behalf Of Grant, Melinda Sent: Wednesday, September 20, 2006 10:49 PM To: xp@pwg.org Subject: XP> Margins, borders, padding, and backgrounds

    From HP's perspective (and I think we're not alone), the CSS specification is difficult to interpret with respect to how margins, borders, padding, and backgrounds work when applied to the <body> and <html> elements. Recently we have learned that the CSS3 Paged Media module is not clear on how the same properties used within an @page context should interact with the html properties. I'd like to share my new-and-improved understanding based on discussions within the CSS WG: ;-)

    * First, there are html attributes and there are css properties. In html, the body element has a bgcolor attribute, but the html element does not. For XHTML documents, the UA (printer) must convert the body bgcolor attribute into an equivalent printer style rule: So <body bgcolor="red"> gets converted into the printer stylesheet rule: body {background-color: red}. (This gets a bit more complicated for HTML documents, but we don't need to go there.) This printer stylesheet rule will be overridden by an author stylesheet rule, should one exist. See http://www.w3.org/Style/Group/css2-src/cascade.html#q13 <http://www.w3.org/Style/Group/css2-src/cascade.html#q13> .

    * The body element is no different when it comes to CSS styling from any other element. Backgrounds, margins etc behave just as they do for a div, for example.

    * The html element is the root element. It can also be selected with ':root'. It is special, in that a background is applied to the margins as well as the content area. This is because it 'paints the canvas', which is infinite. The only way in XHTML to put a background in the html margin area and/or the body margin area is to use a background on the html element. (See http://www.w3.org/TR/CSS21/colors.html#q2 <http://www.w3.org/TR/CSS21/colors.html#q2> .)

    * The attached file, 'margin-both.xhtml' when opened with Firefox, provides an example of how html and body edgings should be rendered.

    There are still some open questions about how @page properties work. I am hoping to publish a new version within the next week or so that will resolve questions such as the following: [My proposed answers are in brackets.]

    * Is a font property set within an @page rule applied to the page content area (unless overridden by properties set on elements rendered on the page), or just to the contents of the page margin boxes? [Proposed Answer: Just to the margin boxes.]

    * Do the html and page margins collapse? [no]

    * Are html and body borders closed at the bottom of each page, or just at the end of the document? [Just at the end of the document]

    * Does a background property set within an @page rule get applied to the page margins? [Yes] To the page area unless obscured by html, body, or other backgrounds? [????, under discussion]

    * On the last page of a document, do the html and body properties terminate immediately after the last content, or at the bottom of the page (e.g., do the html and body margins get drawn right below the last paragraph, or at the bottom of the page? [Immediately after content.]

    * Others?

    Best regards, Melinda

    _____

    HP - Melinda Grant Connectivity Standards Consumer Printing and Imaging +1 (541) 582-3681 melinda.grant@hp.com _____



    This archive was generated by hypermail 2.1.4 : Wed Sep 27 2006 - 18:14:07 EDT