Re: @media in style attribute

On 5/19/04 1:59 PM, "Philip Hoyt" <phoyt@macbox.com> wrote:

> 
> I've been trying to find a way to specify media type for a css rule in
> the style attribute of xhtml. Something like
> <img src="printLogo.gif" style="@media print {display: block} @media
> screen {display:none}" /> but this doesn't seem to be part of any
> specfication, and at least that syntax doesn't work in any modern
> browsers. Seems like it might be useful functionality.

I agree it would be useful functionality.

It is not implemented in any modern browser AFAIK either.

However, the syntax (thus capability) *is* in a draft specification:

 http://www.w3.org/TR/css-style-attr

Which could benefit by being updated to include the example you gave, and
perhaps adding that construct to the "Pseudo-rules 'style' attribute
profile":

 http://www.w3.org/TR/css-style-attr#pseudo-rules

Tantek

Received on Thursday, 1 July 2004 20:38:27 UTC