[cssom] window.getComputedStyle(xx, "::first-letter") (and "::first-line" perhaps) Re: [CSS21][12.2 The 'content' property] computed value on :first-line and :first-letter

(I meant to sent my previous mail just to www-archive but failed, please
forgive me.)

(12/01/09 3:38), Anton Prowse wrote:
> This bug is being tracked at
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=15457
>
> I propose the following change:
>
>   | Except on :before and :after, always computes to 'normal'. On
>   | :before and :after, if 'normal' is specified, computes to 'none';
>   | otherwise, for URI values, the absolute URI; for attr() values, the
>   | resulting string; for other keywords, as specified.
>

I was going to ask how is the computed value of the 'content' property
on ::first-line/::first-letter going to be testable, but then I figured
all browsers already implemented window.getComputedStyle(xx,
"::first-letter'), although this is not speced yet in CSSOM[1].

Do we want to standardize this? I am not too familiar with the use cases
of querying window.getComputedStyle(xx, "::first-letter") and the compat
requirements here. Browsers exhibit very different behaviors when you
query the ::first-letter of elements that don't yet exist[2][3], but
otherwise I think it is interoperable to some extent besides that Opera
always gives the style of the innermost ::first-letter and somehow
violates the fictional tags interpretation. Since this behavior is
probably a lot less complicated than anything else, I think we might
want to standardize Opera's behavior for normal case like[2], although
Gecko's "always create a temporary formatting object" approach might be
interesting too.

Any thoughts? I think I might be testing angles that don't quite align
with how people would want to use this API and I don't mind if we decide
not to expose this info to Web authors at all.

[1] http://dev.w3.org/csswg/cssom/#extensions-to-the-window-interface
[2]
http://lists.w3.org/Archives/Public/www-archive/2012Jan/att-0009/getComputedStyle-first-letter
[3]
http://lists.w3.org/Archives/Public/www-archive/2012Jan/att-0009/getComputedStyle-nested-first-letter


Cheers,
Kenny

Received on Sunday, 15 January 2012 12:17:30 UTC