W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: [css-text 3 and 4] hyphenation & interop

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 10 May 2013 18:43:19 -0700
Message-ID: <518DA237.9050301@inkedblade.net>
To: www-style@w3.org
On 03/22/2013 09:22 PM, Liam R E Quin wrote:
> It's a mistake to define hyphenation as in css text level 3 without
> saying how hyphenated words behave. Luckily some of the necessary text
> has already been written for css text level 4.
>
> Some things that need to be clarified:
>
> . hyphenation is a property of rendering, not of the DOM (disregarding
>    shadow DOMs for a moment) - a search for "barefoot" must work even
>    if the word has been hyphenated as bare-
>    foot, and if the text is reflowed, e.g. because of a change in
>    viewport size, the word may be hyphenated differently or not at
>    all in subsequent renderings.

Added
   "Hyphenation is a rendering effect only: it must have no effect
    on the underlying document content or on text selection or searching.

> . soft hyphen characters must not affect search: they are to be
>    ignored in both search strings and document text.

I think this is out-of-scope for CSS, in the same way that
handling variation selectors is out-of-scope for CSS.

> . ASCII hyphen ("-") can be used as a break character, as can
>    the soft hyphen. Breaking at &shy; must insert "-" from the
>    current font.

I believe this is covered by reference to UAX14. No?

>      Note: level 4 proposes a custom hyphenation character.
>      I think a selector approach might be better, as then colour
>      and/or an image could be used, e.g. a picture of a curved
>      arrow in code listings, offset from the text.

Filed http://www.w3.org/Style/CSS/Tracker/issues/330 to look at
at some point in the future.

> . A renderer is never required to hyphenate, even if a single
>    "word" is longer than the available space. Existing overflow
>    strategies can be used.

I think this falls under "CSS Text Level 3 does not define the exact
rules for hyphenation."...

> . A user agent or renderer MAY add a preference to allow users to
>    enable hyphenation by default for any text in their language, or
>    any text not specifically marked for language; there
>    should also be an option to disable hyphenation altogether.

This is true under the general provisions for user style sheets.
Did you want it explicitly called out as a note?

~fantasai
Received on Saturday, 11 May 2013 01:43:46 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:11 UTC