Re: CSS2 errata - border backgrounds

On Tue, 31 Jul 2001, fantasai wrote:
>
> I know background color and background image are separate layers,
> but I see them as both forming a single entity-- the background. If
> I'm dealing exclusively with the background, then they are separate
> layers.

Maybe, then, the clarification of the spec should make them distinct
concepts, and say that "the background colour layer should extend to
the padding edge. The background image layer should extend (and be
relative to) the padding edge, and should be painted on top of the
background colour layer".


> Suppose I'm decorationg a wall with paint and wallpaper.

A great example! I know about this one from experience. The wall if
first plastered and then painted all the way from the floor to the
ceiling. A skirting board is then put around the wall next to the
floor, and the wall paper is then pasted onto the wall from the top of
the skirting board up to the top of the wall. (Actually in practice
there is usually a small overlap behind the skirting board because in
real life tiling is hard to achieve perfectly, but that overlap is
only a concession to the difficulty of achieving the wanted effect.)


>>     +------------------------------------
>>     :\ frame =============================
>>     : \ \  +-------------------------------
>>     :  \ \  \                           :  :
>>     :   \ \  \                          :  :
>>     :    \ \  \                         :  :
>>     :     ` `  `                        :  :
>>     :                                   :  :
>>    \:/                                 \:/ :
>>     +------------------------------------  :
>>      \ canvas                             \:/
>>       \    + - - - - - - - - - - - - - - -
>>        \     YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
>>         \    \YY painting (image) YYYYYYYYYY
>>          \     YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
>>           `    `''''''''''''''''''''''''''''''
>>
>> ...where the background-image (painting) is on top of the
>> background-color (canvas), while the border (frame) goes on the
>> remaining part the background-color (canvas).
>
> The picture does extend under the border in cases where the it does
> not have a plain edge.

Again, only because it easier to let the paint bleed when trying to
achieve the look of a sharp edge.


> This is very often the case with photographs.

Usually it's only a small bleeding "margin" (for lack of a better
word) which overlaps under the border. The picture as believed to
exist by the viewer stops at the (equivalent of the) padding edge.


> So your analogy does not hold.

Well, it's hard to draw analogies to real world concepts when talking
about the CSS block box model painting order! :-/


> Nonetheless, that's a nifty diagram.>:)

Thanks.


> BTW, is the background fixed and positioned to the entire viewport,
> or just the viewport of that element? I mean, if I have an element
> with constrained size and scrollbars (like a textarea), is the
> background image fixed to the viewport of the entire document or
> just the textarea's box?

Technically, the viewport. This issue is (was?) under discussion.


>>> 17.5.1 - The image depicting a table with background-
>>>          colored, double-bordered cells does not show
>>>          any of the background between the two stripes
>>>          of border.
>>
>> Um, yes it does.
>
> I meant the "red" background--the background color of the element to
> which the border belongs.

Ah, indeed. That returns to the original question of what on earth
should happen on a table, though.


>> Given that the existing errata items can be taken as normative
>> parts of the specification, why do you believe the spec should be
>> changed, and exactly how do you think it should be changed?
>
> I believe the confines of the background area should be
> consistent--that is, the same for both background color and image.

Besides it being "logical", which you haven't really provided any
argument for, why do you believe that? Given that this is an issue of
aesthetics, I'm not sure there can be a "right" answer.

Here's a summary of why I believe the spec should remain as is (but
with more explicit clarifications):

   1. We agree that the background image should be positioned and
      clipped to the padding edge.

   2. The background-color covers the entire box.

   3. I believe the border forms a part of the box rather than going
      around the box. This is a concept derived from CSS1.

Given those three statements, the two background layers would get
different edges.


> If I ask for a transparent border, the border area should be
> indistinguishable.

In that case, what is the difference between a transparent left border
and a left margin, say?


> If it's not, that will be seen as a bug.

If it is, it seems pretty useless to me.


> Note that background images aren't always pictures; they are most
> often textures. Why should the fabric stop being fabric when it
> reaches some invisible barrier? Why should granite be laminated
> around the edge of the box? Is there a reason the sky lacks clouds
> in this unnaturally straight rectangular area?

Why would the fabric/granite/sky have a transparent border (or any
border) in the first place?


> So, IMO, the CSS2 spec should either
> a) Revert to the original wording and change 8.5.3 to be
>    consistent with 14.2
> or
> b) Change all five sections I listed to paint backgrounds,
>    both color and tiled image, in the border area.

Personablly I think the spec should:

  c) keep the status quo, but be made clearer in CSS3.

-- 
Ian Hickson                                            )\     _. - ._.)   fL
Invited Expert, CSS Working Group                     /. `- '  (  `--'
The views expressed in this message are strictly      `- , ) -> ) \
personal and not those of Netscape or Mozilla. ________ (.' \) (.' -' ______

Received on Tuesday, 31 July 2001 17:11:53 UTC