Skip to content

Commit 1e9d087

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

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

css-snap-size/Overview.bs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ the closest multiple of the unit.
6363
defines how to compute the line box height
6464
after the line box was constructed from inline-level boxes.
6565
The rounding is applied to the computed line box height.
66-
The additional spaces created by the rounding
67-
are added <a>over</a> and <a>under</a> the line box.
6866

6967
The <a>grid baseline position</a> then determines
7068
how the additional spaces are distributed to <a>over</a> and <a>under</a>.
@@ -126,8 +124,8 @@ Snapping Baselines {#snap-baseline}
126124
When the <a>grid baseline position</a> is a positive number equals to or less than 1,
127125
the additional spaces are distributed using the following formula:
128126

129-
* space-over = (BP - T &amp; GU + GU) &amp; GU
130-
* space-under = GU - (space-over + T + B) &amp; GU
127+
* space-over = BP - T % GU, add GU if negative
128+
* space-under = GU - (space-over + T + B) % GU
131129
* GU: the <a>grid unit</a>.
132130
* BP: the <a>grid baseline position</a> &times; GU / 100.
133131
* T: the distance between the top of the line box and the baseline.

0 commit comments

Comments
 (0)