@@ -84,10 +84,13 @@ sample such effects asynchronously as well.
8484
8585## Value Definitions ## {#values}
8686
87- This specification follows the <a href="https://www.w3.org/TR/CSS2/about.html#property-defs">CSS property definition conventions</a> from [[!CSS2]]
88- using the <a href="https://www.w3.org/TR/css-values-3/#value-defs">value definition syntax</a> from [[!CSS-VALUES-3]] .
89- Value types not defined in this specification are defined in CSS Values & Units [[!CSS-VALUES-3]] .
90- Combination with other CSS modules may expand the definitions of these value types.
87+ This specification follows the <a
88+ href="https://www.w3.org/TR/CSS2/about.html#property-defs"> CSS property
89+ definition conventions</a> from [[!CSS2]] using the <a
90+ href="https://www.w3.org/TR/css-values-3/#value-defs"> value definition
91+ syntax</a> from [[!CSS-VALUES-3]] . Value types not defined in this specification
92+ are defined in CSS Values & Units [[!CSS-VALUES-3]] . Combination with other
93+ CSS modules may expand the definitions of these value types.
9194
9295In addition to the property-specific values listed in their definitions,
9396all properties defined in this specification
@@ -254,7 +257,7 @@ If we use this API for this case, the example code will be as follow:
254257if (window.matchMedia('(prefers-reduced-motion: no-preference)' ).matches) {
255258 var animation = div.animate({ width: '100%' }, { duration: 1000, fill: "forwards" });
256259 animation.timeline = new ScrollTimeline(
257- {
260+ {
258261 start: 0,
259262 end: CSS.percent(100)
260263 }
@@ -328,19 +331,19 @@ enum ScrollDirection {
328331The {{ScrollDirection}} enumeration specifies a direction of scroll of a
329332scrollable element.
330333
331- : <code> block</code>
334+ : ` block`
332335:: Selects the direction along the [=block axis=] , conforming to writing mode
333336 and directionality.
334337
335- : <code> inline</code>
338+ : ` inline`
336339:: Selects the direction along the [=inline axis=] , confirming to writing mode
337340 and directionality.
338341
339- : <code> horizontal</code>
342+ : ` horizontal`
340343:: Selects the physical horizontal direction (ignoring writing mode and
341344 directionality).
342345
343- : <code> vertical</code>
346+ : ` vertical`
344347:: Selects the physical vertical direction (ignoring writing mode and
345348 directionality).
346349
@@ -394,13 +397,13 @@ determined not by wall-clock time, but by the progress of scrolling in a
394397
395398 <div class="switch">
396399
397- : If the <code> source</code> member of |options| is missing,
400+ : If the ` source` member of |options| is missing,
398401 :: The {{scrollingElement}} of the {{Document}} <a lt="document
399402 associated with a window">associated</a> with the {{Window}} that is
400403 the <a>current global object</a> .
401404
402405 : Otherwise,
403- :: The <code> source</code> member of |options|.
406+ :: The ` source` member of |options|.
404407
405408 </div>
406409
@@ -429,19 +432,19 @@ determined not by wall-clock time, but by the progress of scrolling in a
429432
430433 On setting, run the procedure to [=set the offset value=] with the provided
431434 value as |val|.
432-
433-
435+
436+
434437 The procedure to <dfn>set the offset value</dfn> with |val| as the provided
435438 value has the following steps:
436-
439+
437440 1. If |val| is a {{DOMString}} , let |val| be the result of
438441 <a lt="rectify a keywordish value">rectifying the keywordish value</a> .
439442
440443 2. Set the offset value to be the result corresponding to the first
441444 matching condition from the following:
442445
443446 <div class="switch">
444-
447+
445448 : If |val| is a {{CSSKeywordValue}} and <a lt="match the grammar">
446449 matches the grammar</a> `auto`:
447450 :: Return |val|.
@@ -511,11 +514,11 @@ the [=effective scroll offset=] that is resolved from {{end}}.
511514A <dfn>container-based offset</dfn> is a scroll timeline offset that is declared
512515only in relation with the <a>scroll container</a> as specified by {{source}} .
513516
514- A [=container-based offset=] is provided in the {{CSSNumericValue}} or
517+ A [=container-based offset=] is provided in the {{CSSNumericValue}} or
515518{{CSSKeywordValue}} forms.
516519
517520The procedure to <dfn>resolve a container-based offset</dfn> given
518- <var> offset</var> is as follows:
521+ | offset| is as follows:
519522
5205231. If <em> any</em> of the following are true:
521524
@@ -529,12 +532,12 @@ The procedure to <dfn>resolve a container-based offset</dfn> given
529532 first matching condition from the following:
530533 <div class="switch">
531534
532- : If <var> offset</var> is a {{CSSKeywordValue}} and
535+ : If | offset| is a {{CSSKeywordValue}} and
533536 <a lt="match the grammar">matches</a> `auto`:
534537 :: Either the beginning or the ending of {{source}} 's scroll range in
535538 {{orientation}} depending on whether the offset is {{start}} or {{end}} .
536539
537- : If <var> offset</var> is a {{CSSNumericValue}} and
540+ : If | offset| is a {{CSSNumericValue}} and
538541 <a lt="match the grammar">matches</a> <<length-percentage>> :
539542 :: The distance indicated by the value along {{source}} 's scroll range in
540543 {{orientation}} as expressed by absolute length, a percentage, or a
@@ -593,14 +596,14 @@ dictionary ElementBasedOffset {
593596 of the target that is expected to be visible in {{source}} 's [=scrollport=]
594597 at the intersection offset.
595598
596- Issue(5203): The range of the <code> threshold</code> member is not currently
599+ Issue(5203): The range of the ` threshold` member is not currently
597600checked anywhere.
598601
599602</div>
600603
601604
602605The procedure to <dfn>resolve an element-based offset</dfn> given
603- <var> offset</var> is as follows:
606+ | offset| is as follows:
604607
6056081. If <em> any</em> of the following are true:
606609
@@ -610,63 +613,63 @@ The procedure to <dfn>resolve an element-based offset</dfn> given
610613
611614 The [=effective scroll offset=] is null and abort remaining steps.
612615
613- 1. Let <var> target</var> be <var> offset</var> 's {{target}} .
616+ 1. Let | target| be | offset| 's {{target}} .
614617
6156181. If <em> any</em> of the following are true:
616619
617- * <var> target</var> is null, or
618- * <var> target</var> does not currently have a [=CSS layout box=] .
620+ * | target| is null, or
621+ * | target| does not currently have a [=CSS layout box=] .
619622
620623 The [=effective scroll offset=] is null and abort remaining steps.
621624
622625
623- 1. If <var> target</var> 's nearest [=scroll container=] ancestor
626+ 1. If | target| 's nearest [=scroll container=] ancestor
624627 is not {{source}}
625628 abort remaining steps
626629 since the [=effective scroll offset=] is null.
627630
628- 1. Let <var> container box</var> be the {{source}} 's [=scrollport=] .
631+ 1. Let | container box| be the {{source}} 's [=scrollport=] .
629632
630- 1. Let <var> target box</var> be the result of finding
633+ 1. Let | target box| be the result of finding
631634 the rectangular bounding box
632635 (axis-aligned in {{source}} ’s coordinate space)
633- of <var> target</var> 's transformed border box.
636+ of | target| 's transformed border box.
634637
635- 1. If <var> offset</var> 's {{edge}} is ' start' then
636- let <var> scroll offset</var>
637- be the scroll offset at which <var> container box</var> 's start edge is flush
638- with the <var> target box</var> 's end edge
638+ 1. If | offset| 's {{edge}} is ' start' then
639+ let | scroll offset|
640+ be the scroll offset at which | container box| 's start edge is flush
641+ with the | target box| 's end edge
639642 in the axis and direction determined by {{orientation}} .
640643
641- 1. If <var> offset</var> 's {{edge}} is ' end' then
642- let <var> scroll offset</var>
643- be the scroll offset at which <var> container box</var> 's end edge is flush
644- with the <var> target box</var> 's start edge
644+ 1. If | offset| 's {{edge}} is ' end' then
645+ let | scroll offset|
646+ be the scroll offset at which | container box| 's end edge is flush
647+ with the | target box| 's start edge
645648 in the axis and direction determined by {{orientation}} .
646649
647- 1. Let <var> threshold amount</var> be the result of evaluating the following
648- expression where <var> target dimension</var> is <var> target box</var> 's dimension in the axis
650+ 1. Let | threshold amount| be the result of evaluating the following
651+ expression where | target dimension| is | target box| 's dimension in the axis
649652 determined by {{orientation}} .
650653 <blockquote>
651- <code><var> threshold amount</var> = {{threshold}} × <var> target dimension</var> </code>
654+ <code> | threshold amount| = {{threshold}} × | target dimension| </code>
652655 </blockquote>
653656
654657
655- 1. Adjust <var> scroll offset</var> by <var> threshold amount</var> as follow:
658+ 1. Adjust | scroll offset| by | threshold amount| as follow:
656659 <div class="switch">
657660
658- : If <var> offset</var> 's {{edge}} is ' start',
659- :: <var> scroll offset</var> = <var> scroll offset</var> - <var> threshold amount</var> .
661+ : If | offset| 's {{edge}} is ' start',
662+ :: | scroll offset| = | scroll offset| - | threshold amount| .
660663
661- : Otherwise (<var> offset</var> 's {{edge}} is ' end'),
662- :: <var> scroll offset</var> = <var> scroll offset</var> + <var> threshold amount</var> .
664+ : Otherwise (| offset| 's {{edge}} is ' end'),
665+ :: | scroll offset| = | scroll offset| + | threshold amount| .
663666
664667 </div>
665668
666- 1. Clamp the value of <var> scroll offset</var> to be within the {{source}} 's
669+ 1. Clamp the value of | scroll offset| to be within the {{source}} 's
667670 scroll range.
668671
669- 1. The [=effective scroll offset=] is <var> scroll offset</var>
672+ 1. The [=effective scroll offset=] is | scroll offset|
670673
671674
672675<div class="note">
@@ -771,7 +774,7 @@ follows:
771774
772775<div class="switch">
773776
774- : If the {{timeRange}} has the value <code> "auto"</code> ,
777+ : If the {{timeRange}} has the value ` "auto"` ,
775778:: The [=effective time range=] is the maximum value of the
776779 [=target effect end=] of all animations
777780 directly associated with this timeline.
@@ -803,7 +806,7 @@ The procedure to calculate <dfn>effective scroll range</dfn> of a
803806 :: The [=effective scroll range=] is the result of evaluating the following
804807 expression:
805808 <blockquote>
806- <code> [=effective end offset=] - [=effective start offset=] </code>
809+ ` [=effective end offset=] - [=effective start offset=] `
807810 </blockquote>
808811
809812 </div>
@@ -822,18 +825,18 @@ The [=phase=] of a {{ScrollTimeline}} is calculated as follows:
822825
823826 The [=phase=] is [=inactive phase|inactive=] and abort remaining steps.
824827
825- 1. Let <var> current scroll offset</var> be the current scroll offset of
828+ 1. Let | current scroll offset| be the current scroll offset of
826829 {{source}} in the direction specified by {{orientation}} .
827830
8288311. The [=phase=] is the result corresponding to the first matching condition
829832 from below:
830833
831834<div class="switch">
832835
833- : If <var> current scroll offset</var> is less than [=effective start offset=] :
836+ : If | current scroll offset| is less than [=effective start offset=] :
834837:: The [=phase=] is [=before phase|before=]
835838
836- : If <var> current scroll offset</var> is greater than or equal to [=effective
839+ : If | current scroll offset| is greater than or equal to [=effective
837840 end offset=] <em> and</em> [=effective end offset=] is less than the maximum
838841 scroll offset of {{source}} in {{orientation}} :
839842
@@ -865,26 +868,26 @@ The [=current time=] of a {{ScrollTimeline}} is calculated as follows:
865868
866869 The [=current time=] is an unresolved time value and abort remaining steps.
867870
868- 1. Let <var> current scroll offset</var> be the current scroll offset of
871+ 1. Let | current scroll offset| be the current scroll offset of
869872 {{source}} in the direction specified by {{orientation}} .
870873
8718741. The [=current time=] is the result corresponding to the first matching
872875 condition from below:
873876
874877<div class="switch">
875878
876- : If <var> current scroll offset</var> is less than [=effective start offset=] :
879+ : If | current scroll offset| is less than [=effective start offset=] :
877880:: The [=current time=] is 0.
878881
879- : If <var> current scroll offset</var> is greater than or equal to [=effective
882+ : If | current scroll offset| is greater than or equal to [=effective
880883 end offset=] :
881884:: The [=current time=] is the [=effective time range=] .
882885
883886: Otherwise,
884887:: The [=current time=] is the result of evaluating the following expression:
885888
886889 <blockquote>
887- <code> ( <var> current scroll offset</var> - [=effective start offset=] ) / [=effective scroll range=] × [=effective time range=] </code>
890+ `(| current scroll offset| - [=effective start offset=] ) / [=effective scroll range=] × [=effective time range=] `
888891 </blockquote>
889892
890893</div>
@@ -942,18 +945,18 @@ condition from the following:
942945: If 'source' is a 'selector()'
943946:: The [=scroll container=] identified by the <<id-selector>> .
944947
945- : If 'source' is <code> auto</code>
948+ : If 'source' is ` auto`
946949:: The {{scrollingElement}} of the {{Document}} <a lt="document associated with
947950 a window">associated</a> with the {{Window}} that is the
948951 <a>current global object</a> .
949952
950- : Otherwise ('source' is <code> none</code> )
953+ : Otherwise ('source' is ` none` )
951954:: null.
952955
953956</div>
954957
955958Issue(4338): Consider choosing animation target's nearest scrollable ancestor
956- instead of document's scrolling Element for <code> auto</code> .
959+ instead of document's scrolling Element for ` auto` .
957960
958961<pre class='descdef'>
959962 Name : orientation
@@ -1177,7 +1180,7 @@ frame.
11771180Nothing in this section is intended to require that scrolling block on layout
11781181or script. If a user agent normally composites frames where scrolling has
11791182occurred but the consequences of scrolling have not been fully propagated in
1180- layout or script (for example, <code> scroll</code> event listeners have not yet
1183+ layout or script (for example, ` scroll` event listeners have not yet
11811184run), the user agent may likewise choose not to sample scroll-driven animations
11821185for that composited frame. In such cases, the rendered scroll offset and the
11831186state of a scroll-driven animation may be inconsistent in the composited frame.
0 commit comments