W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2020

[csswg-drafts] [css-text-3] Is testcase css-text/white-space/full-width-leading-spaces-004.html correct? (#5732)

From: jfkthame via GitHub <sysbot+gh@w3.org>
Date: Tue, 17 Nov 2020 14:59:18 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-744812275-1605625157-sysbot+gh@w3.org>
jfkthame has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text-3] Is testcase css-text/white-space/full-width-leading-spaces-004.html correct? ==
I'm trying to understand whether [this testcase](https://github.com/web-platform-tests/wpt/blob/master/css/css-text/white-space/full-width-leading-spaces-004.html) is valid per the CSS Text 3 rules.

The testcase has
<div class="test">&#x03000;</div>
styled with
.test {
    width: min-content;
    font-size: 100px;
    line-height: 1;
    background: green;
(and using the Ahem font), and expects it to render as a 100px green square.

However, it's not clear to me that the `min-content` width of this element should in fact be 100px. Its content is an IDEOGRAPHIC SPACE, which has General Category = Zs and is therefore an [other space separator](https://drafts.csswg.org/css-text-3/#other-space-separators) in CSS Text 3 terms. This character is the only thing on the line, so clearly it is "at the end of a line (after bidi reordering)".

According rule 4 of the [Trimming and Positioning](https://drafts.csswg.org/css-text-3/#white-space-phase-2) rules, then:

> If there remains any sequence of white space, and/or other space separators, at the end of a line (after bidi reordering [CSS-WRITING-MODES-3]):

>    If white-space is set to normal, nowrap, or pre-line, the UA must hang this sequence (unconditionally). 

this character must [hang](https://drafts.csswg.org/css-text-3/#hang), which means that it is

> not taken into account when computing intrinsic sizes

and so the `min-content` width of the element should be zero, not 100px.

Am I missing something here, or is the testcase wrong in expecting this ideographic space to create a 100px `min-content` width?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5732 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 17 November 2020 14:59:20 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:22 UTC