You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
White Space Collapsing</span><aclass=self-linkhref=#white-space></a></h3>
715
715
716
-
<p><idata-link-type=dfntitle="collapsible white space">Collapsible white space</i>within a ruby structure is discarded
716
+
<p>White spacewithin a ruby structure is <ahref=#anon-gen-discard-space>discarded</a>
717
717
<ul>
718
718
<li>at the beginning and end of a <adata-link-type=dfnhref=#ruby-containertitle="ruby container">ruby container</a>, <adata-link-type=dfnhref=#ruby-annotation-container-boxtitle="ruby annotation container">ruby annotation container</a>, or <adata-link-type=dfnhref=#ruby-base-container-boxtitle="ruby base container">ruby base container</a>,
719
-
<li>at the beginning/end of a <adata-link-type=dfnhref=#ruby-annotation-boxtitle="ruby annotation box">ruby annotation box</a> or <adata-link-type=dfnhref=#ruby-base-boxtitle="ruby base box">ruby base box</a> if white space is not its only contents,
720
719
<li>between a <adata-link-type=dfnhref=#ruby-base-container-boxtitle="ruby base container">ruby base container</a> and its following <adata-link-type=dfnhref=#ruby-annotation-container-boxtitle="ruby annotation container">ruby annotation container</a>,
<p>Between <adata-link-type=dfnhref=#ruby-segmentstitle="ruby segments">ruby segments</a>, between <adata-link-type=dfnhref=#ruby-base-boxtitle="ruby bases">ruby bases</a>, and between <adata-link-type=dfnhref=#ruby-annotation-boxtitle="ruby annotations">ruby annotations</a>, however,
725
-
white space is not discarded.
724
+
white space is not discarded,
725
+
and is maintained for rendering
726
+
as <adata-link-type=dfnhref=#inter-base-white-spacetitle="inter-base white space">inter-base</a>,
727
+
<adata-link-type=dfnhref=#inter-annotation-white-spacetitle="inter-annotation white space">inter-annotation</a>,
728
+
or <adata-link-type=dfnhref=#inter-segment-white-spacetitle="inter-segment white space">inter-segment white space</a>.
729
+
(See <ahref=#box-fixup>Anonymous Ruby Box Generation</a>, above.)
730
+
731
+
<divclass=example>
732
+
<p>These rules allow ruby to be used with space-separated scripts such as Latin.
<p>Where undiscarded white space is <idata-link-type=dfntitle=collapsible>collapsible</i>, it will collapse
728
746
following the standard <ahref=http://www.w3.org/TR/css3-text/#white-space-rules>white space processing rules</a>. <adata-biblio-type=normativedata-link-type=bibliohref=#biblio-css3texttitle=biblio-css3text>[CSS3TEXT]</a>
729
-
For <idata-link-type=dfntitle=collapsible>collapsible</i>white space between <adata-link-type=dfnhref=#ruby-segmentstitle="ruby segments">ruby segments</a>, however,
747
+
For <idata-link-type=dfntitle="collapsible white space">collapsible white space</i> between <adata-link-type=dfnhref=#ruby-segmentstitle="ruby segments">ruby segments</a> (<adata-link-type=dfnhref=#inter-segment-white-spacetitle="inter-segment white space">inter-segment white space</a>), however,
730
748
the contextual text for determining collapsing behavior is given by the <adata-link-type=dfnhref=#ruby-base-boxtitle="ruby bases">ruby bases</a> on either side,
731
-
not the text on either side of the white space in the source document.
749
+
not the text on either side of the white space in source document order.
732
750
733
751
<divclass=note>
734
752
<p>Note that the white space processing rules
735
753
cause a white space sequence containing a <idata-link-type=dfntitle="segment break">segment break</i> (such as a line feed)
736
-
to <ahref=http://www.w3.org/TR/css3-text/#line-break-transform>collapse to nothing</a> between CJK characters.
737
-
This means that CJK ruby can safely use white space for indentation of the ruby markup.
754
+
to <ahref=http://www.w3.org/TR/css3-text/#line-break-transform>collapse to nothing</a> between Han and Kana characters.
755
+
This means that Chinese and Japanese ruby can safely use white space for indentation of the ruby markup.
738
756
For example, the following markup will display without any spaces:
739
757
<pre><ruby>
740
758
<rb>東</rb><rb>京</rb>
741
759
<rt>とう</rt><rt>きょう</rt>
742
760
</ruby></pre>
761
+
<pclass=issueid=issue-6f614186><aclass=self-linkhref=#issue-6f614186></a>This example actually doesn’t trigger the rule in question. Come up with one that does.
743
762
<p>However, white space that does not contain a <idata-link-type=dfntitle="segment break">segment break</i> does not collapse completely away,
744
763
so this markup will display with a space between the first and second ruby pairs:
<p>Any preserved white space is then wrapped in an anonymous box belonging to
752
-
the <adata-link-type=dfnhref=#ruby-base-container-boxtitle="ruby base container">ruby base container</a> (if between <adata-link-type=dfnhref=#ruby-base-boxtitle="ruby bases">ruby bases</a>),
753
-
<adata-link-type=dfnhref=#ruby-annotation-container-boxtitle="ruby annotation container">ruby annotation container</a> (if between <adata-link-type=dfnhref=#ruby-annotation-boxtitle="ruby annotations">ruby annotations</a>),
754
-
or <adata-link-type=dfnhref=#ruby-containertitle="ruby container">ruby container</a> (if between <adata-link-type=dfnhref=#ruby-segmentstitle="ruby segments">ruby segments</a>).
755
-
In the latter case, the text is considered part of the <adata-link-type=dfnhref=#base-leveltitle="base level">base level</a>.
756
-
Such anonymous boxes do not take part in pairing.
757
-
They merely ensure separation between adjacent bases/annotations.
758
-
759
-
<pclass=issueid=issue-1851041e><aclass=self-linkhref=#issue-1851041e></a>Specify how these anonymous white space boxes impact layout.
760
-
761
-
<divclass=example>
762
-
<p>These rules allow ruby to be used with space-separated scripts such as Latin.
0 commit comments