- From: Ian Hickson <py8ieh@bath.ac.uk>
- Date: Tue, 3 Nov 1998 19:37:21 +0000 (GMT)
- To: Christian Kaufhold <chka@uni-bremen.de>
- cc: www-style@w3.org
Christian - I actually agree with most of your post, but have only quoted a limited amount so that this doesn't get out of hand. > I actually meant multiple urls like content:url(first.mpeg), > url(second.png), url(last.gif), attr(title); as in your suggestion > (as alternatives). And then still the problem is what if first.mpeg > should have always the size 300 x 400 px, but last.gif is smaller, > and the alternative attr() should also not have the size that is > used for displaying the images. Then allowing only one size for > width/height is not enough. True enough. > I just don't think it is neccessary. Quotes and counters mostly are > before or after the element, so it makes things even more > complicated if you could both say: > QUOTE { content:open-quote attr(text) close-quote } > and > QUOTE:before { content:open-quote } > QUOTE:after { content:close-quote } > QUOTE { content:attr(text) } > I think that this is really redundant. True, but without allowing this you cannot do: XYZ { content: open-quote attr(name) close-quote " said: " open-quote attr(text) close-quote; } > On the other hand, multiple textual possibilities (which make only > sense if an uri is contained, granted) don't make things more > complicated IMHO (except perhaps the formal description of the > content property, but that they _are_ needed (see above). Makes sense too. Hmm. So we want: 1) To be able to specify: 1) several alternative uris to turn the element into replaced content, 2) several alternative text/uri combinations to be flowed in, 3) a text-only alternative to be flowed in, 4) that the element's content be flowed in. 5) that the property is inherited 2) To be able to resize each of the items listed in the content property individually. To do (1), we have to allow this: <uri> := "url(" [ <string> | attr(X) ] ")" <replaced> := "replaced(" <string> | attr(X) ] ")" <text> := [ <string> | <counter> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ] content := [ [ [ <replaced> | <text>* <uri> [ <text> | <uri> ]* ] "," ]* [ <text> | auto ] ] | inherit Which seems ok to me. The "simplest" way of doing (2) this would be to allow comma separated values for width/height, each applying to the respective entry in the content property that is used. If there is no entry in the width/height list then "auto" would be used (going the other way doesn't matter, since height/width is decided based on content, not the other way around). so... IMG { content: replaced(attr(src)), attr(text); width: attr(width), auto; height: attr(height), auto; } OBJECT { content: replaced(attr(data)), auto; } IFRAME { content: replaced(attr(src)), replaced(attr(longdesc)), auto; } #TITLE { content: replaced("welcome_and_logo.mov"), replaced("welcome_and_logo.jpg"), "Welcome to " src(logo.gif) " !!", "Welcome to CSS!!"; width: 256px, 300px, auto; height: 64px, 80px, 58px; } Note, when height and width are given but there are less heights/widths than contents, missing values are assigned "auto". Note that when height/width are *not* given, then the cascade may give them a value anyway, and so "auto" might not be assumed. -- Ian Hickson
Received on Tuesday, 3 November 1998 14:37:29 UTC