Open Bug 897380 Opened 12 years ago Updated 2 years ago

asymmetrical scrolling experienced with "dead centre" vertical centering technique

Categories

(Core :: Layout, defect)

22 Branch
defect

Tracking

()

People

(Reporter: eb3f73+buzilla+com, Unassigned)

References

()

Details

Attachments

(1 file)

1. Go to the "Dead Centre" example URL (in the URL field of this bug) 2. Shrink the window down to around 200x200 pixels (scroll bars should appear) Note that when scrolling, one can scroll all the way to the bottom right of the page, but content to the top left is lost (one cannot scroll all the way up/over to see it). I have attempted to isolate the problem with the attached test case. Note the asymmetry of the scrollable portions of the bottom two images. This test case uses the same technique as the "Dead Centre" page, namely, it creates an absolute-positioned, zero-width, zero-height, overflow-visible <div /> in the middle of a display area, then includes content in that div offset by (width / -2) and (height / -2). The "Dead Centre" page explains this approach in more detail. FYI, I can't find a single browser that doesn't do this. I have tested Firefox (recent) and Safari (5.1.9). They all exhibit the same behavior. Corresponding Chromium bug: <https://code.google.com/p/chromium/issues/detail?id=263717>.
Attachment #780244 - Attachment mime type: text/plain → text/html
While odd, this behavior *may* be standards compliant (CSS provides a lot of freedom in this area). I'm not so sure there *must* be such a thing as a renderable negative coordinate in a "page box", for example. From: <http://www.w3.org/TR/CSS2/page.html#outside-page-box>: > The exact formatting of such elements lies outside the scope of this > specification. However, we recommend that authors and user agents > observe the following general principles concerning content outside the > page box: > > * Content should be allowed slightly beyond the page box to allow pages > to "bleed". > * ... > * Authors should not position elements in inconvenient locations just to > avoid rendering them. > * User agents may handle boxes positioned outside the page box in > several ways, including discarding them or creating page boxes for > them at the end of the document. It's possible that by allowing entities with negative coordinates to affect the renderable portion of the page box may break some pages (i.e., those where authors move or hide elements "offscreen" with negative coordinates), even though the approach violates the third bullet point above. See also: <http://www.w3.org/TR/CSS2/visuren.html#propdef-position> <http://www.w3.org/TR/CSS2/syndata.html#value-def-length> I think the crux of this issue comes down to whether to allow containers with "overflow" set to "scroll" or "auto" (and possibly even "visible") to scroll into negative territory. It seems to me that the "symmetrical" thing to do is to allow scrolling with a default behavior of positioning rendered content with (0, 0) at the top left of the container, but this may radically change architecture assumptions (i.e., that container rendering need only expand in two directions (right and bottom)). A related example: <http://jqueryui.com/draggable/#scroll> Note how dragging components to the right or bottom causes scroll bars to appear, and broadens the renderable space, but dragging comments to the left or top does not.
Reproducible on: Mozilla/5.0 (X11; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Hardware: x86 → All
Component: General → Layout
Product: Firefox → Core
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: