W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2011

[whatwg] Fullscreen CSS

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 15 Nov 2011 09:54:15 +1300
Message-ID: <CAOp6jLZEB1pb56uWzaJk_W_j_3WB3YBqggMDf2utgO4R7T8KYw@mail.gmail.com>
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.

Rob
-- 
"If we claim to be without sin, we deceive ourselves and the truth is not
in us. If we confess our sins, he is faithful and just and will forgive us
our sins and purify us from all unrighteousness. If we claim we have not
sinned, we make him out to be a liar and his word is not in us." [1 John
1:8-10]
Received on Monday, 14 November 2011 12:54:15 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:37 UTC