You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the keyword normal or a number paired with an integer
(so if the drop or raise keyword is specified, this will compute to the appropriate integer, either floor(size) or 1). So far, so good: we won't see those keywords in the computed value.
The shortest-serialization principle then implies that if the computed sink value (whether specified as a number or as the drop keyword) equals floor(size), we should omit the second value from the serialization altogether.
There are currently WPT tests that do not match this expectation:
It also asserts that 1.23 raise and raise 1.23 both compute to 1.23 raise. But according to the spec, the raise keyword should have computed to 1. And given a size of 1.23, the sink value of 1 is also what drop would compute to, and therefore can be omitted. To check the computed value where raise was specified, it would be better to use a larger size such as 3.14 instead of 1.23, so that raise and drop will compute to different integers.
The text was updated successfully, but these errors were encountered:
The spec for
initial-letter
says that it computes to(so if the
drop
orraise
keyword is specified, this will compute to the appropriate integer, eitherfloor(size)
or1
). So far, so good: we won't see those keywords in the computed value.The spec also says that the
drop
keywordand that
The shortest-serialization principle then implies that if the computed
sink
value (whether specified as a number or as thedrop
keyword) equalsfloor(size)
, we should omit the second value from the serialization altogether.There are currently WPT tests that do not match this expectation:
https://wpt.live/css/css-inline/initial-letter/initial-letter-valid.html asserts that
drop 1.23
and1.23 drop
both serialize as1.23 drop
, but according to the shortest-serialization principle, thedrop
keyword can (and therefore should) be omitted.https://wpt.live/css/css-inline/initial-letter/initial-letter-computed.html asserts that
drop 1.23
and1.23 drop
both compute to1.23 drop
, which is wrong in two respects:drop
should compute to an integer, and it should then be omitted from the serialization.It also asserts that
1.23 raise
andraise 1.23
both compute to1.23 raise
. But according to the spec, theraise
keyword should have computed to1
. And given a size of1.23
, thesink
value of1
is also whatdrop
would compute to, and therefore can be omitted. To check the computed value whereraise
was specified, it would be better to use a largersize
such as3.14
instead of1.23
, so thatraise
anddrop
will compute to different integers.The text was updated successfully, but these errors were encountered: