Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to prototype: CSS property `text-underline-position`

93 views
Skip to first unread message

Jonathan Kew

unread,
Dec 5, 2019, 1:08:07 PM12/5/19
to dev-pl...@lists.mozilla.org
Summary: This property offers authors added control of the positioning
of underlines, primarily for vertical text (where conventions differ as
to whether an "underline" should appear to the left or right of the
text), and also for horizontal text where a lower underline may be
desirable (e.g. to avoid clashing with frequent subscript characters in
math or scientific content).

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=770780

Standard:
https://drafts.csswg.org/css-text-decor-3/#text-underline-position-property

Platform coverage: all

Preference: layout.css.text-underline-position.enabled

DevTools bug: n/a

Other browsers: Available in Chrome (& related browsers) since v.33,
according to https://caniuse.com/#search=text-underline-position; also
supported in IE/Edge.

web-platform-tests:

Secure contexts: Not restricted - this is a simple CSS property, not
restricted to secure contexts in existing browsers.

Is this feature enabled by default in sandboxed iframes? Yes.
If allowed, does it preserve the invariants in terms of what sandboxed
iframes can do? Yes.

Jonathan Kew

unread,
Dec 5, 2019, 1:08:07 PM12/5/19
to dev-pl...@lists.mozilla.org
[re-sending, with a web-platform-tests link included - sorry!]

Summary: This property offers authors added control of the positioning
of underlines, primarily for vertical text (where conventions differ as
to whether an "underline" should appear to the left or right of the
text), and also for horizontal text where a lower underline may be
desirable (e.g. to avoid clashing with frequent subscript characters in
math or scientific content).

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=770780

Standard:
https://drafts.csswg.org/css-text-decor-3/#text-underline-position-property

Platform coverage: all

Preference: layout.css.text-underline-position.enabled

DevTools bug: n/a

Other browsers: Available in Chrome (& related browsers) since v.33,
according to https://caniuse.com/#search=text-underline-position; also
supported in IE/Edge.

web-platform-tests:
https://wpt.fyi/results/css/css-text-decor/parsing?label=master&q=text-underline-position

James Graham

unread,
Dec 6, 2019, 10:12:46 AM12/6/19
to dev-pl...@lists.mozilla.org
On 03/12/2019 17:50, Jonathan Kew wrote:

> web-platform-tests:
> https://wpt.fyi/results/css/css-text-decor/parsing?label=master&q=text-underline-position

That looks like it's just testing the property computation. Do we also
have tests for the layout effect, or is that difficult to do in this case?

Jonathan Kew

unread,
Dec 9, 2019, 11:54:29 AM12/9/19
to dev-pl...@lists.mozilla.org
There are a couple of WPT tests for the rendering (see
https://wpt.fyi/results/css/css-text-decor?label=master&label=experimental&aligned&q=text-decoration-underline-position),
although reliably testing the rendering is difficult (the test with
lang=ja is currently somewhat broken, as noted in
https://github.com/web-platform-tests/wpt/issues/20604).

JK
0 new messages