In CSS, you can mark a block as applying only to certain types of media. You can also import a stylesheet on the condition that you’re rendering to a particular kind of media. CSS2 defines the available media types as braille, embossed, handheld, print, projection, screen, speech, tty, and tv. HTML4 also defines aural, which is roughly equivalent to speech in CSS2.
Every CSS renderer, including Cowbell, must render to some media type. We could render to screen, by which is generally meant “styling web pages on a desktop monitor”. But window borders are rather different from web pages. If we do render to screen, would it be useful to allow the distinction between screen and handheld (so if you’re viewing the window borders on an N900, the stylesheet can adapt?) If we don’t, what should we render to? There doesn’t seem to be provision or precedent for making up new media types such as window-borders.
If we do make up a new type, perhaps we should make up some media queries to go with it. Would it be useful to write rules which depended on the width or DPI of the monitor? To some extent, you can already depend on the DPI by using linear units such as mm instead of px, so on higher-resolution screens the borders don’t shrink away to nothing. I’m not sure the ability to colour them differently, and so on, is very useful.
You might think that this is only of theoretical interest, since nobody would use a Cowbell stylesheet to style anything other than window borders. But consider the use of SVG as background images; SVG may be styled by CSS, and it might make sense to refer back to the main stylesheet to do so. Such styling would possibly have a different media type from the rendering of the window borders themselves.
So:
- Do we render to screen?
- If so, do we make a distinction for handheld?
- If not, what media type do we render to?
- Is it worth supporting media queries?