-
Notifications
You must be signed in to change notification settings - Fork 715
[css-text-3] Disambiguate "space" #4269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
css-text-3/Overview.bs
Outdated
@@ -1237,11 +1237,11 @@ Text Processing</h3> | |||
</ol> | |||
</li> | |||
<li><p>If 'white-space' is set to ''pre'', ''pre-wrap'', or ''break-spaces'', | |||
any sequence of spaces is treated as a sequence of non-breaking spaces. | |||
any sequence of [=preserved white space=] is treated as a sequence of non-breaking spaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect. We only do this for spaces, not for tabs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, we don't do that for tabs that have been preserved as tabs, but tabs (and new lines) that have been converted to spaces and didn't collapse away do count. I was trying to capture that this is not just for U+0020 that have started their life as such, but I guess you're right that tabs that have been preserved as tabs are part of preserved white space
, and that those are not included.
Possibilities:
- just revert to "spaces", counting on the fact that people will understand that this includes the things that weren't spaces initially but have been converted to spaces at some earlier step. (I'm a little worried about that, because while correct, that stretches the definition of "space" a little bit beyond U+0020, which might make people mistakenly think it includes even more things, such as other space separators).
- rephrase this to make the above point explicit (how?)
- change the definition of
preserved white space
to exclude tabs that have been preserved as tabs, and new lines that have been preserved as new lines, and replacepreserved white space
with "preserved white space, preserved tabs, and preserved newlines" where appropriate in other sections of the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point any white space that was previously something else and is converted to a space is a space. What it was is not relevant.
css-text-3/Overview.bs
Outdated
@@ -1594,7 +1594,7 @@ Text Processing</h3> | |||
|
|||
<li>A sequence at the end of a line | |||
(ignoring any intervening <a>inline box</a> boundaries) | |||
of <a>collapsible</a> spaces (U+0020) | |||
of <a>collapsible</a> [=white space=] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to say spaces, because line breaks are not necessarily removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as https://github.com/w3c/csswg-drafts/pull/4269/files#r320544442
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same answer
css-text-3/Overview.bs
Outdated
@@ -1549,7 +1549,7 @@ Text Processing</h3> | |||
|
|||
<p>As each line is laid out,</p> | |||
<ol> | |||
<li>A sequence of collapsible spaces at the beginning of a line | |||
<li>A sequence of [=collapsible=] [=white space=] at the beginning of a line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should stay spaces as well, since we've converted collapsible white space to spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't collapsible line breaks removed (because they're turned into spaces), and it's only preserved non collapsible line breaks that say?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but now that they're spaces they should just be called spaces.
[=hanging=] or collapsing the advance width of the spaces or tabs | ||
[=hanging=] or collapsing the advance width of the [=white space=], | ||
[=preserved=] [=tabs=], | ||
or [=other space separators=] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think spaces -> white space here wasn't necessary given we're calling out tabs explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be rephrased, but what I'm trying to do ties into what I was saying in https://github.com/w3c/csswg-drafts/pull/4269/files#r320544043.
This includes:
- preserved spaces (regardless of whether they started started their life as U+0020, U+0009, or a line feed)
- preserved tabs
- other space separators
but does not include preserved new lines.
So if we do the redefining of preserved white space
proposed in https://github.com/w3c/csswg-drafts/pull/4269/files#r320544043, this would become
[...] the advance width of the preserved white space, preserved tabs, or other space separators [...]
Linkify and use non ambiguous terminology for "white space", "spaces", and related terminology throughout normative prose. Closes w3c#4267
94e959f
to
e027167
Compare
Linkify and use non ambiguous terminology for "white space", "spaces",
and related terminology throughout normative prose.
Closes #4267