- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 5 Mar 2013 13:05:05 -0800
- To: www-style list <www-style@w3.org>
Recent discussion between me, fantasai, and some internal people over
the 'display-box' property
<http://dev.w3.org/csswg/css-display-3/#the-display-box> have led us
to conclude that it needs to be a completely separate property, not a
longhand of 'display'. (Reasoning below.) However, now we need a
name. We've come up with "box", "show", and "box-tree". Better
suggestions?
Rationale:
Currently the Display module makes "none"-ness a sub-property of
'display'. This does what we want (gives us an independent switch for
whether or not the box is shown, separate from box type), but this has
some problems:
* To set the box type safely, you need to always set two properties,
'display-inside' and 'display-outside', so as to avoid accidentally
clobbering the "none"-ness value.
* Currently, authors use 'display' to set the box type, which means
that UA-stylesheet use of the "none"-ness value will get clobbered
unless everyone rewrites their pages (which won't happen).
Instead, we'd like to move the "none"-ness switch to be an independent
property, that doesn't get reset by the 'display' shorthand. So that
"display:none" still works, the computed value of this new property
will always be "none" if 'display' is "none". ("display: none;" would
now map into a "display-outside: none;" value.)
With this change, the UA stylesheet for HTML's "hidden" attribute would be:
[hidden] { <new-property>: none; }
This will correctly hide the element regardless of what the author
sets 'display' to, while still allowing the author full control over
the way that [hidden] renders (for example, using a transition or
animation to hide the element instead of simply hiding it
immediately).
~TJ and fantasai
Received on Tuesday, 5 March 2013 21:05:57 UTC