- From: fantasai <fantasai@escape.com>
- Date: Tue, 31 Jul 2001 14:43:55 -0400
- To: www-style@w3.org
Ian Hickson wrote: | | (Technically speaking, the errata is a normative part of | the spec.) That's why I didn't say "current" spec. | Ignoring the logic of the behaviour for a second, and | concentrating merely on what the spec says, the two | statements above support my conclusion that background | colours should go underneath the border, while background | images should not, right? Yes, in a roundabout way. background-color and background-image are collectively known as the background, no? The specification addresses them collectively in defining their appearance in the content, border, and padding areas. In the current spec, background images are painted only in the content and padding areas because they are excluded from the border area, not because they were not defined there. | If you view this as a multiple level stack, as I do, maybe | it will seem more consistent (or at least, maybe | consistency will no longer seem to be relevant): 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. Suppose I'm decorationg a wall with paint and wallpaper. The wallpaper goes on top of the paint, and if I'm using just a border, the paint will show elsewhere. They are two separate layers. But when I put up pictures and design the window treatments, I see the wallpaper and paint together as the backdrop for the decor. It makes no difference now whether the border was placed on top of paint, or was part of a plain wallpaper with a patterned edge. | On Sun, 29 Jul 2001, fantasai wrote: | > | > /Logically/ backgrounds should have consistent confines. | | I disagree. While I'm not sure logic can be applied to | this situation, there certainly are examples in the real | world where the behaviour I assert is described by the | spec exists and is accepted as good ("logical", if you | like). One of these would be a painting: | | +------------------------------------ | :\ 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. This is very often the case with photographs. It happens with actual paintings as well. IIRC, the painting usually extends to the very edge of the canvas. The only paintings I remember seeing with a blank edge are those in which the canvas forms part of the picture so that they have indefinite boundaries. There's also the fact that most picture frames do not have holes in them, nor are transparent. As for those frames which /do/ have holes in them, the holes have always, in my experience, been in the part of the frame that overlays the wall and not the picture or the canvas. Furthermore, if you're displaying a picture on a web page, you typically do it with <img>, not with background images, as background images go in the /background/ and aren't the focal point of the element while paintings are the /foreground/ and the focus of the display. So your analogy does not hold. Nonetheless, that's a nifty diagram. >:) | For an aesthetic point of view, painting the borders on | top of the background colour (as opposed to on top of | transparency) seems ugly to me. It also seems illogical if | you view the borders as being drawn on top of the box, | just like the frame in the example above, instead of | around the box. Well, ok.. | > | This testcase demonstrates why it is IMHO nicer for | > | the background images not to overlap the border: | > | > And I agree with you. | | So we are violently agreeing here? *Glances up a section* I guess so. | > | The only outstanding errata item is that the spec | > | should more explicitly state that the background | > | images are clipped to the padding edge. | > | > It's stated in several places already. The CSS2 spec | > is very explicit about this. | | In that case, the spec is clear. (I still think it should | be made even clearer, possibly with an example.) "All tiling covers the content and padding areas of a box." --background-repeat "Even if the image is fixed, it is still only visible when it is in the background or padding area of the element. Thus, unless the image is tiled ('background-repeat: repeat'), it may be invisible." --background-attachment Change "background or padding" to "content or padding" and you should be ok. 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? | > 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. | 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. If I ask for a transparent border, the border area should be indistinguishable. If it's not, that will be seen as a bug. 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? I personally prefer having the border outside the background area, but as I am not really a web designer, I leave that decision to others. 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.
Received on Tuesday, 31 July 2001 14:41:52 UTC