[css-text-decor-3] Add some explanatory notes about text-decoration-position, per #1178

Wed, 18 Oct 2017 20:09:53 -0700

author
fantasai <fantasai.bugs@inkedblade.net>
date
Wed, 18 Oct 2017 20:09:53 -0700
changeset 20012
7baf02b2c7e3
parent 20011
c5a9d0896528
child 20013
c15619284e34

[css-text-decor-3] Add some explanatory notes about text-decoration-position, per #1178

css-text-decor-3/Overview.bs file | annotate | diff | comparison | revisions
     1.1 --- a/css-text-decor-3/Overview.bs	Wed Oct 18 19:39:30 2017 -0700
     1.2 +++ b/css-text-decor-3/Overview.bs	Wed Oct 18 20:09:53 2017 -0700
     1.3 @@ -219,6 +219,11 @@
     1.4  	  <span class=note>It is often rendered as a green wavy underline.</span>
     1.5    </dl>
     1.6  
     1.7 +    Note: In <a>vertical writing modes</a>,
     1.8 +    'text-decoration-position' can cause the underline and overline to switch sides.
     1.9 +    This allows the position of underlines to key off of language-specific preferences
    1.10 +    automatically.
    1.11 +
    1.12      When the value of 'text-decoration-line' is either ''spelling-error'' or ''grammar-error'',
    1.13      the UA may disregard the values of the other <a>sub-properties</a> of 'text-decoration',
    1.14      as well as those of other properties affecting the appearance of the text-decoration such as 'text-underline-position'.
    1.15 @@ -295,6 +300,11 @@
    1.16  <!-- -->}</code></pre>
    1.17    </div>
    1.18  
    1.19 +  Note: The shorthand purposefully omits the 'text-decoration-position' property,
    1.20 +  which is a language/writing-system–dependent setting that keys off the content,
    1.21 +  so that it can cascade and inherit independently
    1.22 +  from the (uninherited) stylistic settings of the 'text-decoration' shorthand.
    1.23 +
    1.24  <h3 id="text-underline-position-property">
    1.25  Text Underline Position: the 'text-underline-position' property</h3>
    1.26  
    1.27 @@ -314,8 +324,10 @@
    1.28      <p>The following example styles modern Chinese, Japanese, and Korean
    1.29        texts with the appropriate underline positions in both horizontal
    1.30        and vertical text:
    1.31 -    <pre>:root:lang(ja), [lang|=ja], :root:lang(ko), [lang|=ko] { text-underline-position: under right; }
    1.32 -<!--   -->:root:lang(zh), [lang|=zh] { text-underline-position: under left; }</pre>
    1.33 +    <pre>
    1.34 +      :root:lang(ja), [lang|=ja], :root:lang(ko), [lang|=ko] { text-underline-position: under right; }
    1.35 +      :root:lang(zh), [lang|=zh] { text-underline-position: under left; }
    1.36 +    </pre>
    1.37      <p>(Note that these rules are part of the suggested
    1.38        <a href="#default-stylesheet">default UA style sheet</a>.)
    1.39    </div>

mercurial