-
Notifications
You must be signed in to change notification settings - Fork 802
[css-text-3] Spaces don't hang when break-spaces is specified #2612
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Closes #2465
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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'') | ||
| 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''), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
|
|
@@ -1246,14 +1252,11 @@ Line Breaking Details</h3> | |
| must be broken after the last white space character that would fit the line, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
|
|
||
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.
If 'overflow-wrap' does not specify ''break-spaces''