Skip to content

Commit 49e4c32

Browse files
committed
[css-ruby] Actually, ruby bases/annotations should follow the ruby base container's directionality.
1 parent ec1ffdc commit 49e4c32

2 files changed

Lines changed: 40 additions & 22 deletions

File tree

css-ruby/Overview.html

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ <h3 class="heading settled heading" data-level=3.4 id=bidi><span class=secno>3.4
921921
a few restrictions must be imposed:
922922
<ul>
923923
<li>The contents of a <a data-link-type=dfn href=#ruby-base-box title="ruby base">ruby base</a> or <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotation">ruby annotation</a> must remain contiguous.
924+
<li><a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">Ruby annotations</a> must be reordered together with their <a data-link-type=dfn href=#ruby-base-box title="ruby bases">ruby bases</a>.
924925
<li>All <a data-link-type=dfn href=#ruby-base-box title="ruby bases">ruby bases</a> spanned by a single <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotation">ruby annotation</a> must remain contiguous.
925926
</ul>
926927

@@ -930,21 +931,29 @@ <h3 class="heading settled heading" data-level=3.4 id=bidi><span class=secno>3.4
930931
Bidi isolation is forced on all <a data-link-type=dfn href=#internal-ruby-boxes title="internal ruby boxes">internal ruby boxes</a> and the <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>:
931932
the <span class=css data-link-type=maybe title=normal>normal</span> and <span class=css data-link-type=maybe title=embed>embed</span> values of <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-writing-modes-3/#propdef-unicode-bidi title=unicode-bidi>unicode-bidi</a> compute to <span class=css data-link-type=maybe title=isolate>isolate</span>,
932933
and <span class=css data-link-type=maybe title=bidi-override>bidi-override</span> computes to <span class=css data-link-type=maybe title=isolate-override>isolate-override</span>.
934+
<p class=note>
935+
Note this means that implicit bidi reordering does not work across ruby bases,
936+
so authors will need to ensure that the <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>’s declared directionality
937+
does indeed match its contents.
933938
<li>
934-
During layout, <a data-link-type=dfn href=#ruby-segments title="ruby segments">ruby segments</a>, <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">ruby annotations</a>, and <a data-link-type=dfn href=#ruby-base-box title="ruby bases">ruby bases</a>
935-
are ordered within their respective containers
939+
During layout, <a data-link-type=dfn href=#ruby-segments title="ruby segments">ruby segments</a> are ordered within the <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
936940
by the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-writing-modes-3/#propdef-direction title=direction>direction</a> property of their <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>.
937-
The <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-writing-modes-3/#propdef-direction title=direction>direction</a> property on <a data-link-type=dfn href=#ruby-base-container-box title="ruby base containers">ruby base containers</a> and <a data-link-type=dfn href=#ruby-annotation-container-box title="ruby annotation containers">ruby annotation containers</a>
938-
is ignored for the purpose of layout.
939-
(However, it can still inherit into the container’s children
940-
and thereby affect the <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#inline-base-direction title="inline base direction">inline base direction</a>
941-
of any <a data-link-type=dfn href=#ruby-base-box title="ruby bases">ruby bases</a> or <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">ruby annotations</a> it contains.)
941+
<li>
942+
Within a segment, <a data-link-type=dfn href=#ruby-base-box title="ruby bases">ruby bases</a> and <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">ruby annotations</a>
943+
are ordered within their respective containers
944+
by the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-writing-modes-3/#propdef-direction title=direction>direction</a> property of the segment’s <a data-link-type=dfn href=#ruby-base-container-box title="ruby base container">ruby base container</a>.
945+
<span class=note>
946+
Note this means the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-writing-modes-3/#propdef-direction title=direction>direction</a> property on <a data-link-type=dfn href=#ruby-annotation-container-box title="ruby annotation containers">ruby annotation containers</a>
947+
is ignored for the purpose of layout.
948+
However, it can still inherit into the container’s children
949+
and thereby affect the <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#inline-base-direction title="inline base direction">inline base direction</a>
950+
of any <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">ruby annotations</a> it contains.
951+
</span>
942952
</ul>
943953

944-
<p class=note>
945-
Note this means that implicit bidi reordering does not work across ruby bases,
946-
so authors will need to ensure that the <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>’s declared directionality
947-
does indeed match its contents.
954+
<p>As with other inline-level content,
955+
the bidi reordering of <a data-link-type=dfn href=#internal-ruby-boxes title="internal ruby boxes">internal ruby boxes</a> happens after line-breaking
956+
so that content is divided across lines according to its logical order.
948957

949958
<p>See <a data-biblio-type=informative data-link-type=biblio href=#biblio-css3-writing-modes title=biblio-css3-writing-modes>[CSS3-WRITING-MODES]</a> for a more in-depth discussion of bidirectional text in CSS.
950959

css-ruby/Overview.src.html

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ <h3 id="bidi">
784784
a few restrictions must be imposed:
785785
<ul>
786786
<li>The contents of a <i>ruby base</i> or <i>ruby annotation</i> must remain contiguous.
787+
<li><i>Ruby annotations</i> must be reordered together with their <i>ruby bases</i>.
787788
<li>All <i>ruby bases</i> spanned by a single <i>ruby annotation</i> must remain contiguous.
788789
</ul>
789790

@@ -793,21 +794,29 @@ <h3 id="bidi">
793794
Bidi isolation is forced on all <i>internal ruby boxes</i> and the <i>ruby container</i>:
794795
the ''normal'' and ''embed'' values of 'unicode-bidi' compute to ''isolate'',
795796
and ''bidi-override'' computes to ''isolate-override''.
797+
<p class="note">
798+
Note this means that implicit bidi reordering does not work across ruby bases,
799+
so authors will need to ensure that the <i>ruby container</i>’s declared directionality
800+
does indeed match its contents.
796801
<li>
797-
During layout, <i>ruby segments</i>, <i>ruby annotations</i>, and <i>ruby bases</i>
798-
are ordered within their respective containers
802+
During layout, <i>ruby segments</i> are ordered within the <i>ruby container</i>
799803
by the 'direction' property of their <i>ruby container</i>.
800-
The 'direction' property on <i>ruby base containers</i> and <i>ruby annotation containers</i>
801-
is ignored for the purpose of layout.
802-
(However, it can still inherit into the container's children
803-
and thereby affect the <i>inline base direction</i>
804-
of any <i>ruby bases</i> or <i>ruby annotations</i> it contains.)
804+
<li>
805+
Within a segment, <i>ruby bases</i> and <i>ruby annotations</i>
806+
are ordered within their respective containers
807+
by the 'direction' property of the segment’s <i>ruby base container</i>.
808+
<span class="note">
809+
Note this means the 'direction' property on <i>ruby annotation containers</i>
810+
is ignored for the purpose of layout.
811+
However, it can still inherit into the container's children
812+
and thereby affect the <i>inline base direction</i>
813+
of any <i>ruby annotations</i> it contains.
814+
</span>
805815
</ul>
806816

807-
<p class="note">
808-
Note this means that implicit bidi reordering does not work across ruby bases,
809-
so authors will need to ensure that the <i>ruby container</i>’s declared directionality
810-
does indeed match its contents.
817+
<p>As with other inline-level content,
818+
the bidi reordering of <i>internal ruby boxes</i> happens after line-breaking
819+
so that content is divided across lines according to its logical order.
811820

812821
<p>See [[CSS3-WRITING-MODES]] for a more in-depth discussion of bidirectional text in CSS.
813822

0 commit comments

Comments
 (0)