Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--
- Specification parts:
- 1 - UAs must apply the 'overflow' property set on the root element to the viewport.
- 2 - When the root element is an HTML "HTML" element or an XHTML "html" element,
- and that element has an HTML "BODY" element or an XHTML "body" element as a child,
- user agents must instead apply the 'overflow' property from the first such child element to the viewport,
- if the value on the root element is 'visible'.
- 3 - The 'visible' value when used for the viewport must be interpreted as 'auto'.
- 4 - The element from which the value is propagated must have a used value for 'overflow' of 'visible'.
- 5 - overflow:auto The behavior of the 'auto' value is user agent-dependent, but should
- cause a scrolling mechanism to be provided for overflowing boxes.
- 6 - A descendant box is positioned absolutely, partly outside the box. Such boxes are not
- always clipped by the overflow property on their ancestors; specifically,
- they are not clipped by the overflow of any ancestor between themselves and their containing block
- -->
- <html style="overflow:visible">
- <body style="overflow:visible">
- Single case where overflow must be propagated from the body to the viewport (2) interpreted as overflow:auto (3)
- and should present a scrollbar (5)
- </body>
- </html>
- <html style="overflow:visible">
- <body style="overflow:hidden">
- This case propagation check happens but fails due to (4), instead applies (1) interpreted as overflow:auto (3)
- and should present a scrollbar (5)
- </body>
- </html>
- <html style="overflow:hidden">
- <body style="overflow:visible">
- No propagation check happens (2), instead applies (1)
- </body>
- </html>
- <html>
- <body style="overflow:hidden">
- Propagation check does not occur due to (2) as the root element should default to overflow:auto not overflow:visible
- If overflow:visible is the default for the root element in FF, the viewport should still interpret this as overflow:auto (3)
- and present a scrollbar (5)
- </body>
- </body>
- <html>
- <body style="overflow:hidden; margin-bottom:1100px">
- <div style="position:absolute; top:1000px">
- As it stands now there is no GUI presented to scroll down to this div if the viewport is smaller than 1000px
- even though the content is not clipped (6)
- </div>
- </body>
- </html>
- <html style="overflow:hidden">
- <body style="overflow:visible">
- <div style="position:absolute; top:1000px">
- This, if FF was standards compliant, would allow the author to disable the UA's scrollbar on the
- initial containing element and apply their own logic to the body's scrollbar as desired.
- </div>
- </body>
- </html>
- <html style="overflow:visible">
- <body style="overflow: /*...insert value...*/; margin: 50px -50px">
- This probably shows why it's a problem most easily.
- overflow:auto - presents 2 scrollbars, one for the UA and one for the body
- overflow:visible - presents 1 scrollbar for the UA
- overflow:hidden - removes both scrollbars
- overflow:scroll - presents 2 scrollbars
- overflow:visible should present 2 scrollbars when appropriate
- overflow:hidden should only hide the body's scrollbar not the initial containing element's scrollbar as well.
- Due to Firefox's handling in the current way you can no longer create a script that simply uses margins to frame
- a document to a device without modifying the contents within the body. Instead you'd have to insert a wrapping div
- to regain proper control of the overflow.
- </body>
- </html>
Add Comment
Please, Sign In to add comment