Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[css-text-3] Spaces don't hang when break-spaces is specified
Closes #2465
  • Loading branch information
frivoal committed Apr 25, 2018
commit 6939ba88ddb69189077a7df4f2b91b60eb2a01d9
41 changes: 22 additions & 19 deletions css-text-3/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -724,17 +724,23 @@ Characters and Letters</h3>
(ignoring any intervening <a>inline box</a> boundaries)
is removed.
<li>If spaces or tabs at the end of a line are non-collapsible
but have 'white-space' set to ''pre-wrap''
the UA must either <a>hang</a> the <a>white space</a>
or visually collapse the character advance widths
of any overflowing spaces
such that they don't take up space in the line.
However, if 'overflow-wrap' is set to ''break-spaces'',
collapsing their advance width is not allowed,
as this would prevent the preserved spaces from wrapping.

Note: Hanging the white space rather than collapsing it
allows users to see the space when selecting or editing text.
but have 'white-space' set to ''pre-wrap'':
<ul>
<li>If the value of 'overflow-wrap' is ''overflow-wrap/normal'' or ''overflow-wrap/break-word''
(i.e. it does not include ''break-spaces'')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If 'overflow-wrap' does not specify ''break-spaces''

the UA must either <a>hang</a> the <a>white space</a>
or visually collapse the character advance widths
of any overflowing spaces
such that they don't take up space in the line.

Note: Hanging the white space rather than collapsing it
allows users to see the space when selecting or editing text.
<li>Otherwise
(i.e. 'overflow-wrap' property includes ''break-spaces''),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

s/includes/specifies/

hanging or collapsing the advance width of is not allowed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

“of is” is not grammatical.

The end-of-lines spaces that would overflow the line are
wrapped as described in the definition of the ''break-spaces'' value.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Normatively, this doesn't belong here. We've already broken lines. If spaces needed to get wrapped, they've already gotten wrapped.


</ol>

Issue: Add example of hanging white space + same example right-aligned.
Expand Down Expand Up @@ -1246,14 +1252,11 @@ Line Breaking Details</h3>
must be broken after the last white space character that would fit the line,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Here is where you specify that the spaces must take up space on the line.

or after the first white space in the sequence if none would fit.

<p class="note">This value does not guarantee that there will never be any overflow due to spaces.
For example, if 'overflow-wrap' is set to ''break-spaces''
and 'white-space' to ''pre-wrap'',
and there is a single <a>preserved</a> space at the end of the line,
and that space overflows,
the rules of ''break-spaces'' do not introduce any additional line break,
and that space does overflow and <a>hang</a>.
Also, if the line length is so short that even a single space does not fit,
As spaces do not hang,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Otherwise this phrase can't be a reminder of that fact.

they affect the box's intrinsic sizes ([=min-content size=] and [=max-content size=]).

<p class="note">This value does not guarantee that there will never be any overflow due to spaces:
for example, if the line length is so short that even a single space does not fit,
overflow is unavoidable.</p>

</dl>
Expand Down