diff --git a/css-overflow-4/Overview.bs b/css-overflow-4/Overview.bs index 8867286427d..c9222d86c33 100644 --- a/css-overflow-4/Overview.bs +++ b/css-overflow-4/Overview.bs @@ -23,6 +23,7 @@ spec:css-pseudo-4; type:selector; text:::first-letter spec:css-pseudo-4; type:selector; text:::first-line spec:css-writing-modes-4; type:dfn; text:start spec:css-writing-modes-4; type:dfn; text:end +spec:css2; type:dfn; text:viewport
url: https://drafts.csswg.org/selectors-3/#subject; type: dfn; text: subject; @@ -1244,6 +1245,191 @@ Fragmentation of Overflow: the 'continue' property This is regardless of whether this would cause any content after the [=clamp point=] to be within the container's bounds. ++Overscroll Behaviors
+ ++Scroll chaining and boundary default actions
+ +Operating Systems have rules for scrolling such as scroll chaining and +overscroll affordances. This specification does not mandate if and how scroll +chaining or overscroll affordances be implemented. This specification only +allows the content author to disable them if any are implemented. + +Scroll chaining is when scrolling is propagated from one +[=scroll container=] to an ancestor [=scroll container=] following the +[=scroll chain=]. Typically scroll chaining is performed starting at the event +target recursing up the [=containing block chain=]. When a [=scroll container=] +in this chain receives a scroll event or gesture it may act on it and/or pass it +up the chain. Chaining typically occurs when the [=scrollport=] has reached its +boundary. + +A scroll chain is the order in which scrolling is propagated from one +[=scroll container=] to another. The [=viewport=] participates in +[=scroll chaining=] as the document's {{Document/scrollingElement}}, both +regarding placement in the scroll chain as well as adhering to the chaining +rules applied to it. + + +Scroll boundary refers to when the scroll position of a +[=scroll container=] reaches the edge of the [=scrollport=]. If a scroll +container has no potential to scroll, because it does not [=overflow=] in the +direction of the scroll, the element is always considered to be at the scroll +boundary. + +Boundary default action refers to the user-agent-defined +default action performed when scrolling against the edge of the [=scrollport=]. +A local boundary default action is a [=boundary default action=] +which is performed on the [=scroll container=] without interacting with the +page, for example displaying a overscroll UI affordance. Conversely, a +non-local boundary default action interacts with the page, for +example scroll chaining or a navigation action. + + ++Overscroll Behavior Properties
+ +The overscroll behavior controls the permitted +[=boundary default action=] for a [=scroll container=] element when its +[=scrollport=] reaches the boundary of its scroll box. + +The 'overscroll-behavior' property specifies the [=overscroll behavior=] for a +[=scroll container=] element. It allows the content author to specify that a +[=scroll container=] element must prevent scroll chaining and/or overscroll +affordances. + +An element that is not [=scroll container=] must accept but ignore the values of +this property. This property must be applied to all scrolling methods supported +by the user agent. + +Note: This property should provide guarantees that are, at least, as strong as +[=preventDefault=] for preventing both scroll chaining and overscroll. Doing +otherwise would cause content authors to use [=preventDefault=] instead. + ++Name: overscroll-behavior +Value: [ contain | none | auto ]{1,2} +Initial: auto auto +Applies to: scroll container elements +Inherited: no +Media: visual +Computed value: see individual properties +Animation type: discrete +Canonical order: per grammar ++ + +The 'overscroll-behavior' property is a shorthand property that sets the +specified values of 'overscroll-behavior-x' and 'overscroll-behavior-y' in that +order. If only one value is specified, the second value defaults to the same +value. + +Values have the following meanings: + +
+Name: overscroll-behavior-x, overscroll-behavior-y +Value: contain | none | auto +Initial: auto +Applies to: scroll container elements +Inherited: no +Logical property group: overscroll-behavior +Percentages: N/A +Media: visual +Computed value: as specified +Animation type: discrete +Canonical order: per grammar ++ +The 'overscroll-behavior-x' property specifies the overscroll behavior in the horizontal +axis and the 'overscroll-behavior-y' property specifies the overscroll behavior in the +vertical axis. When scrolling is performed along both the horizontal and vertical axes at the +same time, the overscroll behavior of each respective axis should be considered +independently. + + +
+Name: overscroll-behavior-inline, overscroll-behavior-block +Value: contain | none | auto +Initial: auto +Applies to: scroll container elements +Inherited: no +Logical property group: overscroll-behavior +Percentages: N/A +Media: visual +Computed value: as specified +Animation type: discrete +Canonical order: per grammar ++ +These properties correspond to the 'overscroll-behavior-x' and +'overscroll-behavior-y' properties. The mapping depends on the element's +'writing-mode'. +