[whatwg] Fullscreen CSS

On Mon, Nov 14, 2011 at 12:54 PM, Robert O'Callahan
<robert at ocallahan.org> wrote:
> On Tue, Nov 15, 2011 at 9:25 AM, Robert O'Callahan <robert at ocallahan.org>wrote:
>
>> Having the rest of the page visible under the fullscreen element is not
>> expected and I think we should default to avoiding it. background:black
>> seemed like the right thing for video and a reasonable default for other
>> kinds of element. Maybe the background:black rule could be at the UA
>> not-important level?
>>
>
> Glenn Maynard wrote:
>
> The background: black makes a basic case strange: fullscreening
> <div>hello</div> will result in black text on a black background. Maybe
> having that on video:fullscreen and maybe img:fullscreen makes sense, but it
> doesn't seem right in general.
>
>
> That's a reasonable point but I'm not sure how to solve it. Making other
> page content visible behind <div>hello</div> (which would happen if we just
> remove the background rule) is just as unexpected, maybe more so.
>
> Brainstorming:
> -- Maybe we could create a new CSS color meaning "the document background
> color (including the fallback color used when the viewport background is
> nominally 'transparent')" and use that here?
> -- Try a rule ":fullscreen-ancestor >
> :not(:fullscreen-ancestor):not(:fullscreen) { display:none; }"? Or
> "opacity:0"?
> I really want to avoid solutions that require magical new CSS behaviors.
>
> I think "video:fullscreen { background:black; }" seems like a good idea in
> any case.

I think we should go the route that the <dialog> element did in Ted's
change proposal and have a pseudo-element that gets created when an
element is fullscreened.  Simple and easy, and trivial for the author
to manipulate to get most effects they could want.

~TJ

Received on Monday, 14 November 2011 13:54:23 UTC