- From: François REMY <fremycompany_msn@yahoo.fr>
- Date: Fri, 19 Nov 2010 15:05:17 +0000
- To: Boris Zbarsky <bzbarsky@mit.edu>, <charles.belov@sfmta.com>, CSS 3 W3C Group <www-style@w3.org>
- Message-ID: <BLU131-W10407A12B0A2BAF7704F3D9D3A0@phx.gbl>
> Date: Fri, 19 Nov 2010 08:24:48 -0500 > From: bzbarsky@MIT.EDU > To: Charles.Belov@sfmta.com; www-style@w3.org > Subject: Re: [css3-content] [css21-content] Syntax for adding alternative text for inserted image > > On 11/19/10 3:41 AM, Belov, Charles wrote: > > http://www.w3.org/TR/css3-content/#inserting3 > > and > > http://www.w3.org/TR/CSS2/generate.html#content > > would be improved by an example as to how to add an alt attribute with a > > text value, for example "New!" onto the image brought in by the uri. > > Uh... If you need to add alt text, then the image has semantic meaning; > it's not just a decoration. > > If it has semantic meaning, then adding it via CSS is just wrong. In > particular, it'll break badly in a UA that just doesn't load your CSS. > > So there is no way to the alt text, because if you need to do it, you're > misusing the feature badly. > > -Boris > I don't completely agree with you. CSS is supposed to be an acceptable way of styling XML documents. Suppose you have something like that <books> <book new="true">My new book</book> <book new="false">My second book</book> <book new="false">My first book</book> </books> You would like to write something like book[new="true"]::before { content: image(url('new.gif),'New: '); } I think it would be legitimate. (Naturally, you could use a XSL stylesheet to perform a first transformation to your XML document but it would require more work) Regards, François
Received on Thursday, 25 November 2010 13:47:27 UTC