RE: OBJECT, inheritance, and rendering

>>>>> "JC" == Jelks Cabaniss <jelks@jelks.nu> writes:

 JC> And we still need a way in CSS to specify the various types that
 JC> can appear in OBJECT, unless I'm missing something that's already
 JC> there.  For example, something like:

 JC> <style type="text/css"><!--
 JC> 	OBJECT text { color: black; background: "bg.gif" font: 9pt courier
 JC> monospace }
 JC> 	OBJECT png  { background: transparent }
 JC> 	OBJECT html { color: green; background: white }
 JC> 	OBJECT xml  { color: maroon; background: white }
 JC> /* These last two could, of course, be overwritten
 JC>    by the LINKed, embedded or inline styles in the
 JC>    documents themselves
 JC> */
 --> </style>

See CSS, section 5.8, Attribute Selectors [1]. Seems to me you could
write what you mean like this (since you specify monospace in your
first rule, I assume you mean text/plain) :

OBJECT[type="text/plain"] { ... }
OBJECT[type="image/png"] { ... }

etc. However, I don't see a way to match whole "type groups"
(e.g. image/*). [type|="image"] is _almost_ the thing for this:

 spec> [att|=val] 
 spec>     Match when the element's "att" attribute value is a
 spec> hyphen-separated list of "words", beginning with "val". The
 spec> match always starts at the beginning of the attribute
 spec> value. This is primarily intended to allow language subcode
 spec> matches (e.g., the "lang" attribute in HTML) as described in
 spec> RFC 1766 ([RFC1766]).

If it would say something more general than "hyphen-separated", it
would work ...

[1] http://www.w3.org/TR/PR-CSS2/selector.html#attribute-selectors

// Rasmus

PS. Don't assume there is a UA that knows about this ...
DS.

-- 
kaj@cityonline.se --------------- Rasmus Kaj - http://www.e.kth.se/~kaj/
 \               CityOnLine IB Production AB - http://www.CityOnLine.se/
  \---------------------------- Pro is to con as progress is to Congress

Received on Tuesday, 4 August 1998 06:34:06 UTC