Re: Pseudo-class :framed for the body element

David Woolley / 2003-04-04 23:27:

>>I was thinking. Would it be useful if one could style a page differently =
>>if it is inside a frame?
>>body{background-color:blue;}
>>body:framed{background-color:green;}
> 
> I'm not sure I want to encourage any use of frames, but, especially
> given that frame elements can only appear in a frame document,
> and body cannot appear in such documents, I think it might be better to
> introduce a virtual frame element in a framed page, so that one gets:
> 
> frame body {background-color: green; color: ...}

I don't like that. If it looks like element selector it should be an 
element selector. If we really want something like this (I thought we're 
trying to get rid of frames...) then it should be a pseudo class 
selector. I think the selector should be used with root element only if 
applied at all:

Possible usage could be
html nl { display: none; }
html:framed nl { display: block; } /* or whatever it should be for nl */

Instead of :framed I'd rather use :embedded. Yes, it collapses with the 
removal of EMBED element but I think it's better than :objectified.

-- 
Mikko

Received on Monday, 7 April 2003 10:18:13 UTC