RE: [css3-text] 'First letter' delimitation

> >>
> >> I share your concern, but do we need an explicit syntax? A web
> >> author
> >> can always use <span> and style it the same as first-letter.
> >
> > Really? I find, increasingly, the need for grapheme cluster
> boundary handling, especially in JavaScript and in places like CSS
> styling. Styling with <span> is incredibly inconvenient and doesn't
> work well with generated data (where span insertion relies on
> automagic means).
> 
> I'm all for giving access to grapheme boundaries from
> CSS/JavaScript.
> however, determining such boundaries should still remain the UA's
> job.  Lets not design for fixing broken UAs with CSS.
> 

I think that's what I'm saying? That is, for example the CSS rule 'first-letter' should be applied to the first grapheme cluster, not to the first Unicode code point. Page authors should not have to do anything grapheme specific in their markup in order to get at the graphemes with e.g. CSS rules or JavaScript. They might need to include @lang to help the user-agent. But they shouldn't need to find and mark-up the grapheme cluster themselves.

Certainly CSS3 :first-letter [1] seems to include selection of grapheme cluster boundaries in its text (albeit somewhat indirectly: the text could be more direct and clearer about text segmentation), so this thread may be moot, but there is clearly an interplay between the UA determining the cluster and various uses of it later (as with CSS3 Selectors). And I totally agree that naïve or broken user agent behavior that may exist today should not be the model for standardization.

Addison

[1] http://www.w3.org/TR/CSS2/selector.html#first-letter



Addison Phillips
Globalization Architect (Lab126)
Chair (W3C I18N, IETF IRI WGs)

Internationalization is not a feature.
It is an architecture.

Received on Wednesday, 13 October 2010 15:53:09 UTC