[whatwg] api for fullscreen()

Tab Atkins Jr. jackalmage at gmail.com
Sat Jan 30 13:52:11 PST 2010


On Fri, Jan 29, 2010 at 11:54 PM, Robert O'Callahan
<robert at ocallahan.org> wrote:
> While a window is
> fullscreen, the root element and the designated fullscreen element, if any,
> are given a pseudoclass "fullscreen". Then you can have some default rules
> in the UA style sheet:
> *:root:fullscreen { overflow:hidden; }
> *:not(:root):fullscreen { position:fixed; left:0; top:0; bottom:0; right:0;
> }

This sounds great to me.  The :not(:root) required to select the
actual element was about to draw an objection from me, but then I
realized that actual authors are almost certainly going to have a good
hook to target the fullscreenable elements anyway, and so won't need
to write that fully-general version of the selector on their own.
Something like "article:fullscreen" or ".widget:fullscreen" would work
fine and be easy to write and understand.

~TJ



More information about the whatwg mailing list