W3C home > Mailing lists > Public > www-style@w3.org > July 2004

Re: @media in style attribute

From: Tantek «elik <tantek@cs.stanford.edu>
Date: Thu, 01 Jul 2004 17:38:53 -0700
To: Philip Hoyt <phoyt@macbox.com>, <www-style@w3.org>
Cc: Ada Chan <adachan@microsoft.com>
Message-ID: <BD09FC71.48F4A%tantek@cs.stanford.edu>

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:


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


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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:14 UTC