Skip to content

Commit 68cce41

Browse files
committed
[css-snap-size] Fix baseline formula
1 parent c64b7ea commit 68cce41

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

css-snap-size/Overview.bs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Snapping Heights: the 'snap-height' property {#snap-height}
3535
Animatable: no
3636
Percentages: N/A
3737
Media: visual
38-
Computed Value: as specified
38+
Computed Value: length becomes the absolute length, others as specified
3939
</pre>
4040

4141
Values have the following meanings:
@@ -126,8 +126,8 @@ Snapping Baselines {#snap-baseline}
126126
When the <a>grid baseline position</a> is a positive number equals to or less than 1,
127127
the additional spaces are distributed using the following formula:
128128

129-
* space-over = GU - mod(T + GU - BP, GU)
130-
* space-under = GU - mod(space-over + T + B, GU)
129+
* space-over = (BP - T &amp; GU + GU) &amp; GU
130+
* space-under = GU - (space-over + T + B) &amp; GU
131131
* GU: the <a>grid unit</a>.
132132
* BP: the <a>grid baseline position</a> &times; GU / 100.
133133
* T: the distance between the top of the line box and the baseline.
@@ -148,12 +148,12 @@ as a consequence.
148148
</div>
149149

150150
The following CSS sets the <a>grid baseline position</a>
151-
to 16pt (20pt &times; .8) from the top.
151+
to 16pt (20pt &times; 0.70) from the top.
152152

153153
<pre class="lang-css">
154154
:root {
155155
--my-grid: 20pt;
156-
snap-height: var(--my-grid) .7;
156+
snap-height: var(--my-grid) 70;
157157
}
158158
</pre>
159159

@@ -183,7 +183,7 @@ Snapping Widths: the 'snap-width' property {#snap-width}
183183
Animatable: no
184184
Percentages: N/A
185185
Media: visual
186-
Computed Value: as specified
186+
Computed Value: length becomes the absolute length, others as specified
187187
</pre>
188188
Values have the following meanings:
189189

0 commit comments

Comments
 (0)