[css3] :viewport pseudo-class

I actually hoped CSS3 Selectors [1] would have included this, but that 
is probably not possible anymore, since it has reached the CR status.

There is need for such a psuedo-class in XML (and maybe in HTML as well) 
documents. If it is there, document authors are able to control the 
background of their document, so that they can style the root element 
independently. Of course, we should keep the backwards compatibility 
parsing for HTML documents (or should I say: text/html), where the 
'background' and 'overflow' properties of the HTML element (and the BODY 
element as well) are applied to the viewport (Mozilla already has a 
pseudo-class I believe, :-moz-viewport).

Currently, in XML, only the 'background' property has special parsing 
when it is applied to the HTML element. I think it is better, when there 
are no exceptions, and every element, "behaves" like a normal DIV 
element in XML documents. I think that Opera comes pretty close to this 
[2]. Another problem is that we don't have control over the 'overflow' 
property of the document in XML documents [3]. Although some people 
probably think that is part of the UI, just like HTML forms, we all know 
that people want to have control over their documents. And if they make 
inapropriate use of the technology, it is not the fault of the W3C that 
documents become inaccessible.

I think that quite a lot of properties should apply to the :viewport 
pseudo-class, like TEXT, FONT, BACKGROUND and COLOR properties. BOX 
MODEL, POSITIONING and FLOAT properties should of course not apply to 
this pseudo-class, since then we would need another and another etc. :-)

[1] <http://www.w3.org/TR/css3-selectors>
[2] <http://www.literarymoose.info/=/destroy/canvas.xhtml>
[3] <http://bugzilla.mozilla.org/show_bug.cgi?id=230554>

PS: is 'css3-forms' considered?

-- 
 Anne van Kesteren
 <http://annevankesteren.nl/>

Received on Monday, 8 March 2004 02:38:47 UTC