Skip to content

[css-inline] Serialization of initial-letter #12186

@jfkthame

Description

@jfkthame

I'd like to get confirmation of the expected serialization of the initial-letter property.

The spec gives its syntax as

normal | <number [1,∞]> <integer [1,∞]> | <number [1,∞]> && [ drop | raise ]?

and then also mentions that

If the initial letter sink value is omitted, drop is assumed.

Taking this together with the shortest serialization principle, it seems that the drop keyword should never appear in the serialization. Is this the correct expectation?

I'm prompted to ask because there are currently WPT tests that do not match this understanding. https://wpt.live/css/css-inline/initial-letter/initial-letter-valid.html expects 1.23 drop and drop 1.23 to both serialize as 1.23 drop (canonical order, but not shortest-form: simply 1.23 would be equivalent).

I'd have some sympathy for an argument that including the drop keyword is good for clarity/readability. But if so, then presumably a specified value of just 1.23 should also serialize as 1.23 drop, for consistency. But the above test expects it to serialize as specified, without a sink value.

I've opened web-platform-tests/wpt#52496 regarding the problems with test here (there's also a computed-value test with incorrect expectations), but would appreciate confirmation of whether the serialized value should include (for clarity) or omit (shortest-form) the drop keyword.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions