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

Re: 3rd call: CSS2: howto disable audio?

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Wed, 25 Jul 2007 22:51:36 +0200
Message-Id: <5AB861D7-FC51-4031-A317-E3D9B5D52837@crissov.de>
Cc: "~:'' ありがとうございました。" <j.chetwynd@btinternet.com>
To: www-style CSS <www-style@w3.org>

ありがとうございました。:

> Please could you consider how to disable audio with CSS2?

How do you disable images with CSS?

> http://www.peepo.co.uk uses css to provide audio on event.

No, it doesn't. It uses CSS to switch the rendering of a certain box  
depeding on pseudo-classes, i.e. setting the value of the |display|  
property. The box in this case is an SVG |foreignObject| with an  
(invalid) HTML fragment inside that contains an |object| element  
embedding an MP3 file. I think there are way simpler test cases:

   div {width: 96px; height: 96px; background: url("speaker.png");}
   div      >object {display: none;}
   div:hover>object {display: block;}

   <div><object data="audio.ogg"/></div>

   (untested)

CSS does not care what happens inside replaced elements like | 
object|, except for how much space they (want to) take up.

I grant you your implicit point that replaced elements may not only  
have intrinsic width and height, but also a duration in terms of an  
audio stream. But CSS 2.1 does not, as far as I remember, include  
support for audio in any kind, it only supports graphical layout on a  
2D area in various ways. Some CSS 3 module might be concerned with  
audio, though. That one will probably have to deal with other audio  
sources than stylesheets.

The following is a slightly different matter than the example above.

   img:hover {background: url("audio.ogg");}

   <img src="speaker.png">

   (untested)

PS: Your tone is heavily inappropriate.
Received on Wednesday, 25 July 2007 20:52:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:51 GMT