Skip to content

[css-text-3] Spaces don't hang when break-spaces is specified - #2612

Merged
frivoal merged 3 commits into
w3c:masterfrom
frivoal:break-spaces-no-hang
May 23, 2018
Merged

[css-text-3] Spaces don't hang when break-spaces is specified#2612
frivoal merged 3 commits into
w3c:masterfrom
frivoal:break-spaces-no-hang

Conversation

@frivoal

@frivoal frivoal commented Apr 25, 2018

Copy link
Copy Markdown
Collaborator

Closes #2465

Comment thread css-text-3/Overview.bs Outdated
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''

Comment thread css-text-3/Overview.bs Outdated
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/

Comment thread css-text-3/Overview.bs Outdated
allows users to see the space when selecting or editing text.
<li>Otherwise
(i.e. 'overflow-wrap' property includes ''break-spaces''),
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.

Comment thread css-text-3/Overview.bs Outdated
(i.e. 'overflow-wrap' property includes ''break-spaces''),
hanging or collapsing the advance width of is not allowed.
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.

Comment thread css-text-3/Overview.bs Outdated
@@ -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.

Comment thread css-text-3/Overview.bs Outdated
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.

@frivoal

frivoal commented Apr 30, 2018

Copy link
Copy Markdown
Collaborator Author

@fantasai Thanks for the review, I think it is now fixed. Can you confirm (and approve), or provide further feedback?

@frivoal frivoal removed the ready label Apr 30, 2018
Comment thread css-text-3/Overview.bs Outdated
* Any sequence of <a>preserved</a> white space
that would otherwise overflow the line and <a>hang</a> or be collapsed as per <a href="#white-space-phase-2">Trimming and Positioning</a>
must be broken after the last white space character that would fit the line,
or after the first white space in the sequence if none would fit.

@fantasai fantasai May 21, 2018

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.

Replace this second clause with “A line breaking opportunity exists after every preserved white space character, including between white space characters” or somesuch. We're not dictating where the line breaks here, we're just altering where it's allowed to break.

@fantasai

Copy link
Copy Markdown
Collaborator

Approved. I'm gonna let you merge, please squash and rebase if you can.

@frivoal
frivoal merged commit e877bcd into w3c:master May 23, 2018
@frivoal
frivoal deleted the break-spaces-no-hang branch May 23, 2018 07:00
@frivoal frivoal added the Tested Memory aid - issue has WPT tests label Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css-text-3 Current Work Tested Memory aid - issue has WPT tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[css-text-3] Audit details of break-spaces value against use cases

3 participants