In article <>,
Ben C <> wrote:
> On 2008-03-13, dorayme <> wrote:
> > In article <>,
> > Ben C <> wrote:
> >
> >> On 2008-03-11, dorayme <> wrote:
> >> > In article <>,
> >> > Ben C <> wrote:
> >> >
....
>
> The key point to consider is this: if you put a background image
> (something anisotropic, like an actual picture, not just a solid colour)
> on the body element, and then scroll the page, the image moves as the
> page scrolls.
>
> That is what browsers have been doing since before the days of CSS, but
> it's actually very weird behaviour and there's no way to get that
> behaviour with CSS except on the root element with the special rules for
> the root element.
>
> The reason is that the region that that image is tiling is not the
> padding box of any particular element: it's the bounding box of the root
> element and all its descendents. That's the so-called "canvas". For
> every other element, you can only put backgrounds on padding boxes.
>
> Put a background image on a div with overflow: scroll and there's no
> way you can make the image move when the div scrolls.
>
> > I am resisting impudently suggesting models I have had in mind
> > until I see a bit more what the models have to account for.
> >
....
>
> The viewport is basically the browser window (or the edge of a
> frame/iframe) and it has a size which the user sets.
>
> Behind the viewport, as it were, is the canvas. The canvas is often
> bigger than the viewport, but you can move it around behind the viewport
> by scrolling, so you can see different bits of it through the viewport.
>
> On top of the canvas is the root element. Inside the root element is
> body, and all the other elements are inside body. The root element and
> everything below it all get widths and heights according to the proper
> CSS rules, with the viewport width as the width of the "initial
> containing block".
>
> So since width is auto by default, they all start off the same width as
> the viewport, minus the horizontal borders/padding/margin of their
> ancestors. Everything flows into the width available to it, usually not
> taking up more width, but dropping down if it needs to. Of course
> sometimes things will take up more width-- when authors have explicitly
> set widths, or written lines that are too long to break into the space,
> etc. Often things take up more height.
>
> So often you end up with the root element and all its descendents taking
> up a larger-than-viewport-sized region of the canvas. If this has
> happened, you get to scroll (usually).
>
> The root element's background is thought of as painted onto the canvas,
> not onto the root element's padding box (where it would normally go). It
> extends infinitely (or at least as far as you can scroll). This is so
> that when you scroll, the root element's background moves with its
> contents and doesn't run out.
Ben C, I quote above to remind you. I have decided over Easter to
look into these matters a bit more. Under the general title of
Root Theory. I have read what you have said to me carefully and I
come back to them now and then with new ways of seeing them.
I make the following acceptances unconditionally.
1. I have decided finally to accept the canvas as a working
hypothesis. It makes life easier.
2. I accept the viewport. I am even happy for it to be an object
with special properties in Root Theory.
3. I accept the html element as real.
Up to now, I have never fully believed in the latter. I have just
played along with it as something that one must be seen in public
to have as a container for the body and the head of an html
document. But I always have had my fingers crossed behind my back
when employing it. I still have little clue about its real
function, why the practical website author ever needs to style it
or do anything but mumble the words at the top and bottom of the
docs and otherwise forget about it. I do know that every now and
then you can get a few things done by including some styling for
it but my memory of this is it is usually to address various
oddities about particular browsers.
I now can let your post go from my newsreader. (You have no idea
how hard it is to hold and recover stuff in MT-Newswatcher).
I will advise of my ruminations in Root Theory as I have
something important to show. Please hold your breath.
--
dorayme
|