Skip to content

Commit 05b08f7

Browse files
committed
Move 'scroll-behavior' from [cssom-view] to [css-overflow-3]
Closes w3c#6482
1 parent 925de3f commit 05b08f7

File tree

2 files changed

+44
-36
lines changed

2 files changed

+44
-36
lines changed

css-overflow-3/Overview.bs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,43 @@ as the Flow-Relative box model properties defined in [[css-logical-1#box]].
684684
'overflow-x' and 'overflow-y' properties.
685685
The mapping depends on the element's 'writing-mode'.
686686

687+
<h3 id=smooth-scrolling caniuse=css-scroll-behavior>
688+
Smooth Scrolling: The 'scroll-behavior' Property</h3>
689+
690+
<pre class=propdef>
691+
Name: scroll-behavior
692+
Value: auto | smooth
693+
Initial: auto
694+
Applies to: <a>scrolling boxes</a>
695+
Inherited: no
696+
Computed value: specified value
697+
Animatable: no
698+
Canonical Order: per grammar
699+
</pre>
700+
701+
The 'scroll-behavior' property specifies the scrolling behavior for a <a>scrolling box</a>,
702+
when scrolling happens due to navigation,
703+
scrolling APIs [[!CSSOM-VIEW]],
704+
or scroll snapping operations not initiated by the user [[!CSS-SCROLL-SNAP-1]].
705+
Any other scrolls, e.g. those that are performed by the user, are not affected by this property.
706+
When this property is specified on the root element, it applies to the <a>viewport</a> instead.
707+
708+
Note: The 'scroll-behavior' property of the HTML <code>body</code> element is <em>not</em> propagated to the viewport.
709+
710+
<dl dfn-type=value dfn-for=scroll-behavior>
711+
<dt><dfn>auto</dfn>
712+
<dd>
713+
The <a>scrolling box</a> is scrolled in an <a spec=cssom-view lt="instant scroll">instant</a> fashion.
714+
715+
<dt><dfn>smooth</dfn>
716+
<dd>
717+
The <a>scrolling box</a> is scrolled in a <a spec=cssom-view lt="smoot scroll">smooth</a> fashion
718+
using a user-agent-defined timing function over a user-agent-defined period of time.
719+
User agents should follow platform conventions, if any. <!--fingerprint-->
720+
</dl>
721+
722+
User agents may ignore this property. <!--fingerprint-->
723+
687724
<h2 id="auto-ellipsis">
688725
Automatic Ellipses</h2>
689726

@@ -1432,6 +1469,12 @@ This specification introduces no new privacy or security concerns.
14321469

14331470
This appendix is <em>informative</em>.
14341471

1472+
<h3 id="changes-since-2020-06-03">
1473+
Changes from the <a href="https://www.w3.org/TR/2020/WD-css-overflow-3-20200603/">2020-06-03 Working Draft</a></h3>
1474+
1475+
* Moved the 'scroll-behavior' property from [[CSSOM-VIEW]] to this specification.
1476+
<!-- This list is not complete -->
1477+
14351478
<h3 id="changes-since-2018-07-31">
14361479
Changes from the <a href="https://www.w3.org/TR/2018/WD-css-overflow-3-20180731/">2018-07-31 Working Draft</a>
14371480
</h3>

cssom-view-1/Overview.bs

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,42 +1644,6 @@ When asked to <dfn>run the scroll steps</dfn> for a {{Document}} <var>doc</var>,
16441644
<td>Fired at the {{Document}} or element when the <a>viewport</a> or element is scrolled, respectively.
16451645
</table>
16461646

1647-
<h2 id=css-properties>CSS properties</h2>
1648-
1649-
Issue: The features in this section should be moved to some other specification.
1650-
1651-
<h3 id=smooth-scrolling caniuse=css-scroll-behavior>Smooth Scrolling: The 'scroll-behavior' Property</h3>
1652-
1653-
<pre class=propdef>
1654-
Name: scroll-behavior
1655-
Value: auto | smooth
1656-
Initial: auto
1657-
Applies to: <a>scrolling boxes</a>
1658-
Inherited: no
1659-
Computed value: specified value
1660-
Animatable: no
1661-
Canonical Order: per grammar
1662-
</pre>
1663-
1664-
The 'scroll-behavior' property specifies the scrolling behavior for a <a>scrolling box</a>,
1665-
when scrolling happens due to navigation, CSSOM scrolling APIs,
1666-
or scroll snapping operations not initiated by the user [[!CSS-SCROLL-SNAP-1]].
1667-
Any other scrolls, e.g. those that are performed by the user, are not affected by this property.
1668-
When this property is specified on the root element, it applies to the <a>viewport</a> instead.
1669-
1670-
<p class=note>The 'scroll-behavior' property of the HTML <code>body</code> element is <em>not</em> propagated to the viewport.
1671-
1672-
<dl dfn-type=value dfn-for=scroll-behavior>
1673-
<dt><dfn>auto</dfn>
1674-
<dd>The <a>scrolling box</a> is scrolled in an instant fashion.
1675-
1676-
<dt><dfn>smooth</dfn>
1677-
<dd>The <a>scrolling box</a> is scrolled in a smooth fashion using a user-agent-defined timing function over a user-agent-defined period of time. User
1678-
agents should follow platform conventions, if any. <!--fingerprint-->
1679-
</dl>
1680-
1681-
User agents may ignore this property. <!--fingerprint-->
1682-
16831647

16841648
Security and Privacy Considerations {#priv-sec}
16851649
===============================================
@@ -1700,6 +1664,7 @@ generally not listed.
17001664
<h3 id='changes-from-2020-10-19' class=no-num>Changes From 19 October 2020</h3>
17011665
* Added the "Security and Privacy Considerations" section
17021666
* Fixed a logical error in the Terminology section.
1667+
* Moved the 'scroll-behavior' property to [[CSS-OVERFLOW-3]]
17031668

17041669
<h3 id='changes-from-2020-01-31' class=no-num>Changes From 31 January 2020</h3>
17051670
* Added Simon Fraser as editor

0 commit comments

Comments
 (0)