diff --git a/css-text-3/Overview.bs b/css-text-3/Overview.bs index 617ce8d947d..97b49d8c697 100644 --- a/css-text-3/Overview.bs +++ b/css-text-3/Overview.bs @@ -418,7 +418,7 @@ Characters and Letters
   Name: white-space
-  Value: normal | pre | nowrap | pre-wrap | pre-line
+  Value: normal | pre | nowrap | pre-wrap | break-spaces | pre-line
   Initial: normal
   Applies to: inline boxes
   Inherited: yes
@@ -456,6 +456,20 @@ Characters and Letters
     
pre-wrap
Like ''pre'', this value preserves white space; but like ''white-space/normal'', it allows wrapping. +
break-spaces
+
The behavior is identical to that of ''white-space/pre-wrap'', + except that: + * Any sequence of preserved white space always takes up space, + including at the end of the line. + * A line breaking opportunity exists after every preserved white space character, + including between white space characters. + + As preserved spaces take up space and do not hang, + they affect the box's intrinsic sizes ([=min-content size=] and [=max-content size=]). + +

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.

pre-line
Like ''white-space/normal'', this value collapses consecutive spaces and allows wrapping, but preserves segment breaks in the source as forced line breaks. @@ -473,6 +487,7 @@ Characters and Letters New Lines Spaces and Tabs Text Wrapping + End-of-line spaces @@ -481,30 +496,42 @@ Characters and Letters Collapse Collapse Wrap + Remove ''pre'' Preserve Preserve No wrap + Preserve ''nowrap'' Collapse Collapse No wrap + Remove ''pre-wrap'' Preserve Preserve Wrap + Collapse or hang + + + ''break-spaces'' + Preserve + Preserve + Wrap + Wrap ''pre-line'' Preserve Collapse Wrap + Remove @@ -623,7 +650,7 @@ Characters and Letters invisible, but retains its soft wrap opportunity, if any.) -
  • If 'white-space' is set to ''pre'' or ''pre-wrap'', +

  • 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. However, a soft wrap opportunity exists at the end of the sequence. @@ -669,7 +696,7 @@ Characters and Letters

    Segment Break Transformation Rules

    -

    When 'white-space' is ''pre'', ''pre-wrap'', or ''pre-line'', +

    When 'white-space' is ''pre'', ''pre-wrap'', ''break-spaces'', or ''pre-line'', segment breaks are not collapsible and are instead transformed into a preserved line feed (U+000A). @@ -730,9 +757,8 @@ Characters and Letters (ignoring any intervening inline box boundaries) is removed.

  • If spaces or tabs at the end of a line are non-collapsible - but have 'white-space' set to ''pre-wrap'': -
      -
    • If 'overflow-wrap' does not specify ''overflow-wrap/break-spaces'' +
        +
      • If 'white-space' is set to ''pre-wrap'', the UA must either hang the white space or visually collapse the character advance widths of any overflowing spaces @@ -740,9 +766,9 @@ Characters and Letters Note: Hanging the white space rather than collapsing it allows users to see the space when selecting or editing text. -
      • Otherwise - (i.e. 'overflow-wrap' property specifies ''overflow-wrap/break-spaces''), +
      • If 'white-space' is set to ''break-spaces'', hanging or collapsing the advance width of spaces at the end of the line is not allowed. +
      @@ -1215,7 +1241,7 @@ Line Breaking Details
         Name: overflow-wrap, word-wrap
      -  Value: normal | break-word || break-spaces
      +  Value: normal | break-word
         Initial: normal
         Applies to: inline boxes
         Inherited: yes
      @@ -1247,20 +1273,6 @@ Line Breaking Details
             Shaping characters are still shaped as if the word were not
             broken, and grapheme clusters must stay together as one unit.
             No hyphenation character is inserted at the break point.
      -    
      break-spaces
      -
      Line breaks are handled as usual, - except that: - * Any sequence of preserved white space always takes up space, - including at the end of the line. - * A line breaking opportunity exists after every preserved white space character, - including between white space characters. - - As preserved spaces take up space and do not hang, - they affect the box's intrinsic sizes ([=min-content size=] and [=max-content size=]). - -

      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.