Skip to content
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

[css-text-3] Disambiguate "space" #4269

Merged
merged 1 commit into from
Sep 10, 2019
Merged

Conversation

frivoal
Copy link
Collaborator

@frivoal frivoal commented Sep 3, 2019

Linkify and use non ambiguous terminology for "white space", "spaces",
and related terminology throughout normative prose.

Closes #4267

@frivoal frivoal added the css-text-3 Current Work label Sep 3, 2019
@frivoal frivoal self-assigned this Sep 3, 2019
@@ -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.
Copy link
Collaborator

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.

Copy link
Collaborator Author

@frivoal frivoal Sep 4, 2019

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 replace preserved white space with "preserved white space, preserved tabs, and preserved newlines" where appropriate in other sections of the spec.

Copy link
Collaborator

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.

@@ -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=]
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same answer

@@ -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
Copy link
Collaborator

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.

Copy link
Collaborator Author

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?

Copy link
Collaborator

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=]
Copy link
Collaborator

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?

Copy link
Collaborator Author

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
@frivoal frivoal merged commit 9d0056d into w3c:master Sep 10, 2019
@frivoal frivoal deleted the space-clarify branch September 10, 2019 05:02
@frivoal frivoal added Closed Accepted as Editorial Testing Unnecessary Memory aid - issue doesn't require tests labels Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Editorial css-text-3 Current Work Testing Unnecessary Memory aid - issue doesn't require tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[css-text] full-width spaces not covered in the collapsible/preserved space definition
2 participants