- From: Philipp Hoschka <hoschka@yahoo.com>
- Date: Wed, 23 May 2001 06:33:06 -0700 (PDT)
- To: Kari Pihkala <kpihkala@cc.hut.fi>, www-smil@w3.org
Kari, short answer: there is no text in SMIL, so there is no "need" to do text styling. Styling should happen in the text media object itself, e.g. in the html file that the "text" media object refers to in its "src" attribute. You could imagine an architecture where style information in the SMIL document influences the style information contained in the text media object, but I guess that may be difficult to do in a general way. Does this make sense ? -Philipp --- Kari Pihkala <kpihkala@cc.hut.fi> wrote: > > Hello, > > I got a question about styles in SMIL after staring > at standard > Courier 10 black on white font in the text elements. > It would be nice > to format text using CSS2. However, none of the SMIL > elements have > the style attribute. It would be nice to know why? > > I know there are alternative ways to do this, one is > to use external > stylesheets in the beginning of the XML document: > > <?xml-stylesheet href="style.css" type="text/css"?> > > However, I consider this limiting, especially for > scripting. > Frequently, the color of the text is wanted to be > changed when mouse > is over it. But, the above stylesheet can't be > modified from the script > and prevents changing the color. > > One solution is to use the <layout type="text/css"> > element. > The regions will then be defined using CSS2, which > includes text > formatting, for example: > > [region="b"] { top: 20px; left: 10px; font-family: > Arial; color: blue; } > [region="r"] { top: 20px; left: 10px; font-family: > Arial; color: red; } > > The script would then change the region of the text > element from 'b' to 'r'. > <text region="b" ... > becomes > <text region="r" ... > > > Another way is to use CSS2 classes: > > [region="area"] { top: 20px; left: 10px; } > .red { color: red; } > .blue { color: blue; } > > The script would then change the class attribute of > the text element > from 'red' to 'blue'. > <text class="red" region="area" ... > becomes > <text class="blue" region="area" ... > > > But I find this a bit cumbersome. The way it would > be done in HTML is: > > <text region="area" style="color: red;"> > > and the style attribute would then be changed using > the script. > I understand this may produce some problems. The > region of the media > element could be defined using the style attribute: > > <text region="area" style="top: 10px; left: 20px"> > > and this is probably something unwanted. (or is it?) > > It would be nice to hear opinions about this. Is > there a reason not to > have the style attribute? > SVG and XHTML have it. They also have a style > element. > > - Kari > > __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Received on Wednesday, 23 May 2001 09:33:11 UTC