Open Bug 1789266 Opened 2 years ago Updated 2 years ago

text decoration needs to skip spaces at start/end of lines

Categories

(Core :: Layout: Text and Fonts, defect, P3)

defect

Tracking

()

People

(Reporter: florian, Unassigned)

Details

Based on https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-spaces-property (for the explicit use of text-decoration-skip-spaces: start end) or on https://drafts.csswg.org/css-text-decor-3/#line-decoration (for the default behavior when no particular property tries to adjust the skipping), spaces at the start and end of the line are supposed to be skipped by text decorations such as underlines.

Firefox doesn't do that, as can be seen in
http://wpt.live/css/css-text-decor/text-decoration-skip-spaces-001.html
http://wpt.live/css/css-text-decor/text-decoration-skip-spaces-002.html
http://wpt.live/css/css-text-decor/text-decoration-skip-spaces-003.html
http://wpt.live/css/css-text-decor/text-decoration-skip-spaces-004.html

Note that Firefox does skip underlining preserved spaces in some limited conditions:

  • only preserved spaces (U+0020 when the white-space property has some specific values), not other spacers
  • only when white-space is pre-wrap (not pre or break-spaces)

The CSSWG has been asked as whether this was a case of the spec being expected to align with implementations, or implementations with the spec, and does seem to expect spec compliance (see https://github.com/w3c/csswg-drafts/issues/4653)

Severity: -- → S3
Flags: needinfo?(jfkthame)
Priority: -- → P3

More of a Layout than Graphics issue, I think.

We don't yet support the text-decoration-skip-spaces property at all, so there's no explicit control of this; but also our current behavior doesn't match the expected default.

Component: Graphics: Text → Layout: Text and Fonts
Flags: needinfo?(jfkthame)
You need to log in before you can comment on or make changes to this bug.