- From: David Woolley <david@djwhome.demon.co.uk>
- Date: Thu, 3 Jul 2003 21:07:53 +0100 (BST)
- To: www-style@w3.org
> text-alternative: attr(myAlt); This is attempting to put semantics information (which belongs in a schema or higher level document) into a presentation hinting document. I think what you really meant here was something like (give or take a few punctuation characters, and choice of better names): img:broken {content: attr(myAlt); } For Windows IE's abuse of alt attributes (see recent discussion on the HTML list) and the behaviour of obsolescent NS browsers, you might have: img:tool-tip {content: (attr(myAlt); } However, there is arguably no reason to have a special tool-tip pseudo-element as: img:broken:after {position: absolute; background-color: yellow; color: black; font-face:.....} would seem pretty close and more in the spirit of CSS (remember that CSS is only hints and browsers can resort to methods provided by their environment, such as the standard OS tool-tips). However, it might be worth noting the discussion on the HTML list recently that suggests that many uses of images (spacer.gif and images of text, should only exist in the style sheet. That would mean that many uses of alt would be better done with inline text and the image brought in as a content: styling when the hypothetical images-on pseudo class was active. > source: attr(mySource); This is again trying to specify semantics in the wrong place. I think this is basically, at the level that CSS addresses, just: source:images-on {.... content: attr(mySource);....} However, it might be worth noting the discussion on the HTML list recently that suggests that many uses of images (spacer.gif and friends, and images of text), should only exist in the style sheet. > myImage[mySource$=".gif"] { > mime-type: "image/gif"; > } Again that is semantics.
Received on Thursday, 3 July 2003 16:08:33 UTC