Re: [css3-2d-transforms][cssom-view] Transforming text from the baseline

On 22 February 2011 00:06, Thomas Phinney <tphinney@cal.berkeley.edu> wrote:
> I assume the intent is to have it be the baseline of the first line of text
> in the block (mainly useful for single-line text blocks). You might want to
> be explicit about that, though. It does seem quite useful in certain cases.
> Cheers,
> T

Yeah, that was what I meant by using the baseline of the first inline
box. My grasp of the visual formatting model and related terminology
isn't complete, but my understanding is that an inline-level element
contains inline boxes that correspond to lines of text in the render.
So yeah, it would be the first line of text.

I can't really see any use cases for applying a transform with an
origin set to subsequent lines. Although, it has set me thinking that
some kind of :nth-line and :nth-word pseudo element selectors would be
useful for creating animations that apply to particular parts of a
body of text. Possible use case would be a screen reader that
highlighted text as the audio played. Although I guess that would be a
lot more niche and a lot harder to implement, so I won't hold my
breath :-)

Anyway, I'm glad people think it's a useful suggestion. I'll just have
to hope someone is interested enough to try an experimental
implementation. Might have a go at submitting a patch to Firefox
myself, though it may be beyond my limited C++ skills :-)

Jon

Received on Tuesday, 22 February 2011 13:04:26 UTC