Skip to content

Commit e38423b

Browse files
committed
Sketch out @hyphenate-resource rule from Oslo F2F notes.
1 parent e03ade9 commit e38423b

2 files changed

Lines changed: 107 additions & 3 deletions

File tree

css3-text/Overview.html

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 17 January
9090
<dt>This version:
9191

9292
<dd><a href="http://dev.w3.org/csswg/css3-text/Overview.html">$Date:
93-
2011/01/17 02:25:32 $ (CVS $Revision$)</a> <!--<dd><a
93+
2011/01/17 02:30:16 $ (CVS $Revision$)</a> <!--<dd><a
9494
href="http://www.w3.org/TR/2010/WD-css3-text-20101005/">http://www.w3.org/TR/2010/WD-css3-text-20101005/</a></dd> -->
9595

9696

@@ -287,6 +287,10 @@ <h2 class="no-num no-toc" id=contents>Table of Contents</h2>
287287
Hyphenation Line Limits: the &lsquo;<code
288288
class=property>hyphenate-limit-lines</code>&rsquo; and &lsquo;<code
289289
class=property>hyphenate-limit-last</code>&rsquo; properties</a>
290+
291+
<li><a href="#hyphenation-resource"><span class=secno>6.4. </span>
292+
Hyphenation Resources: the &lsquo;<code
293+
class=css>@hyphenate-resource</code>&rsquo; rule</a>
290294
</ul>
291295

292296
<li><a href="#wrapping"><span class=secno>7. </span> Text Wrapping</a>
@@ -1713,6 +1717,52 @@ <h3 id=hyphenate-line-limits><span class=secno>6.3. </span> Hyphenation
17131717
</pre>
17141718
</div>
17151719

1720+
<h3 id=hyphenation-resource><span class=secno>6.4. </span> Hyphenation
1721+
Resources: the &lsquo;<code class=css>@hyphenate-resource</code>&rsquo;
1722+
rule</h3>
1723+
1724+
<p>The &lsquo;<code class=css>@hyphenate-resource</code>&rsquo; <a
1725+
href="http://www.w3.org/TR/CSS21/syndata.html#at-rules">at-rule</a> allows
1726+
the author to specify hyphenation resources that the UA may use to help it
1727+
hyphenate text correctly.
1728+
1729+
<p>The &lsquo;<code class=css>@hyphenate-resource</code>&rsquo; rule
1730+
consists of the &lsquo;<code class=css>@hyphenate-resource</code>&rsquo;
1731+
at-keyword followed by a hyphenation mapping declaration block, which has
1732+
the same syntax as a declaration block, except that the properties are
1733+
language codes and the property values are comma-separated lists of
1734+
&lt;url&gt; component values.
1735+
1736+
<p>The author-specified hyphenation resources that apply to the text in an
1737+
element are the resources given by the last hyphenation mapping
1738+
declaration whose language code matches the language of the element.
1739+
Language code matching must be performed using RFC4647 [[!RFC4647]] <span
1740+
class=issue>explain exactly how</span>.
1741+
1742+
<p class=note>Since the last matching declaration takes effect, authors
1743+
should list the most general mapping first, and the most specific last.
1744+
Note also that declarations are not concatenated, so if multiple
1745+
dictionaries are needed, they must be listed completely in each
1746+
declaration.
1747+
1748+
<pre class=example>
1749+
@hyphenate-resource {
1750+
en: url(en-GB.hy);
1751+
en-US: url(en-US.hy);
1752+
fr: url(fr.hy);
1753+
}
1754+
</pre>
1755+
1756+
<p>The UA may use its own dictionaries in addition to, or in place of,
1757+
those suggested by the author.
1758+
1759+
<p class=issue>Mix in an &lsquo;<code class=css>auto</code>&rsquo; keyword,
1760+
to specify priority of UA dictionary wrt author dictionary?
1761+
1762+
<p class=issue>Use a format specifier, like @font-face?
1763+
1764+
<p>UAs are not required to support this at-rule.
1765+
17161766
<h2 id=wrapping><span class=secno>7. </span> Text Wrapping</h2>
17171767

17181768
<p>Text wrapping is controlled by the &lsquo;<a href="#text-wrap0"><code
@@ -4596,7 +4646,7 @@ <h4 id=text-emphasis-position><span class=secno>11.2.4. </span> Emphasis
45964646
class=css>below right</code>&rsquo;</dfn>
45974647

45984648
<dd>Draw marks below the text in horizontal layout, to the right in
4599-
vertical typographic.
4649+
vertical typographic mode.
46004650
</dl>
46014651

46024652
<p class=issue>Do we need to add &lsquo;<code class=css>left</code>&rsquo;
@@ -4959,6 +5009,14 @@ <h3 class=no-num id=recent-changes> Changes from the <a
49595009
&lsquo;<code class=css>ideograph-parenthesis</code>&rsquo; values of
49605010
&lsquo;<a href="#text-autospace0"><code
49615011
class=property>text-autospace</code></a>&rsquo;.
5012+
5013+
<li>Copied hyphenation controls over from <a
5014+
href="http://www.w3.org/TR/css3-gcpm">CSS3 Generated Content for Paged
5015+
Media Module</a> and updated with feedback from <a
5016+
href="http://lists.w3.org/Archives/Public/www-style/2010Nov/0241.html">TPAC</a>
5017+
and <a
5018+
href="http://lists.w3.org/Archives/Public/www-style/2010Sep/0002.html">Oslo
5019+
F2F</a>.
49625020
</ul>
49635021

49645022
<h2 class=no-num id=acknowledgements> Acknowledgements</h2>

css3-text/Overview.src.html

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,48 @@ <h3 id="hyphenate-line-limits">
11671167
<!-- -->Antarctica.
11681168
<pre>
11691169
</div>
1170+
1171+
<h3 id="hyphenation-resource">
1172+
Hyphenation Resources: the ''@hyphenate-resource'' rule</h3>
1173+
1174+
<p>The ''@hyphenate-resource'' <a href="http://www.w3.org/TR/CSS21/syndata.html#at-rules">at-rule</a>
1175+
allows the author to specify hyphenation resources that the UA
1176+
may use to help it hyphenate text correctly.
1177+
1178+
<p>The ''@hyphenate-resource'' rule consists of the ''@hyphenate-resource''
1179+
at-keyword followed by a hyphenation mapping declaration block, which
1180+
has the same syntax as a declaration block, except that the properties
1181+
are language codes and the property values are comma-separated lists
1182+
of &lt;url&gt; component values.
1183+
1184+
<p>The author-specified hyphenation resources that apply to the text in
1185+
an element are the resources given by the last hyphenation mapping
1186+
declaration whose language code matches the language of the element.
1187+
Language code matching must be performed using RFC4647 [[!RFC4647]]
1188+
<span class="issue">explain exactly how</span>.</p>
1189+
1190+
<p class="note">Since the last matching declaration takes effect,
1191+
authors should list the most general mapping first, and the most
1192+
specific last. Note also that declarations are not concatenated,
1193+
so if multiple dictionaries are needed, they must be listed
1194+
completely in each declaration.</p>
1195+
1196+
<pre class="example">
1197+
@hyphenate-resource {
1198+
en: url(en-GB.hy);
1199+
en-US: url(en-US.hy);
1200+
fr: url(fr.hy);
1201+
}
1202+
</pre>
1203+
1204+
<p>The UA may use its own dictionaries in addition to, or in place of,
1205+
those suggested by the author.
1206+
1207+
<p class="issue">Mix in an ''auto'' keyword, to specify priority of
1208+
UA dictionary wrt author dictionary?</p>
1209+
<p class="issue">Use a format specifier, like @font-face?</p>
1210+
1211+
<p>UAs are not required to support this at-rule.</p>
11701212

11711213
<h2 id="wrapping">
11721214
Text Wrapping</h2>
@@ -3491,7 +3533,7 @@ <h4 id="text-emphasis-position">
34913533
vertical typographic mode. This is the default position.</dd>
34923534
<dt><dfn title="text-emphasis:below-right">''below right''</dfn></dt>
34933535
<dd>Draw marks below the text in horizontal layout, to the right in
3494-
vertical typographic.</dd>
3536+
vertical typographic mode.</dd>
34953537
</dl>
34963538

34973539
<p class="issue">Do we need to add ''left'' combinations?</p>
@@ -3784,6 +3826,10 @@ <h3 class="no-num" id="recent-changes">
37843826
'punctuation-trim'.
37853827
<li>Removed ''ideograph-space'' and ''ideograph-parenthesis'' values
37863828
of 'text-autospace'.
3829+
<li>Copied hyphenation controls over from
3830+
<a href="http://www.w3.org/TR/css3-gcpm">CSS3 Generated Content for Paged Media Module</a>
3831+
and updated with feedback from <a href="http://lists.w3.org/Archives/Public/www-style/2010Nov/0241.html">TPAC</a>
3832+
and <a href="http://lists.w3.org/Archives/Public/www-style/2010Sep/0002.html">Oslo F2F</a>.
37873833
</ul>
37883834

37893835
<h2 class="no-num" id="acknowledgements">

0 commit comments

Comments
 (0)