[webkit-dev] -webkit-inline-box and visible descendants

Tab Atkins Jr. jackalmage at gmail.com
Wed Oct 19 17:15:59 PDT 2011


Dominic Cooney <dominicc at chromium.org> said:
> Hi webkittens,
>
> Is there a spec for -webkit-inline-box?

Yup, it's the old Flexbox spec.  Currently being removed/replaced by
Ojan and Tony's work.


> I am investigating an assertion failure I can tickle using
> -webkit-inline-box. But to fix this, I first need to understand what the
> intended behavior is. If I have this markup:
>
> <!DOCTYPE html>
> <style>
> #a {
>  display: -webkit-inline-box;
>  visibility: collapse;
> }
>
> #b {
>  visibility: visible;
> }
> </style>
> <div id="a">
> <div id="b">
> foo
> </div>
> </div>
>
> This displays "foo"--pretty unsurprising. Same result as if #a had display:
> inline-block, incidentally.
>
> However if I wrap #b in another div, nothing is displayed. Plausible because
> the new div inherits visibility: collapse from #a. But is this
> intended/correct? Because it breaks the analogy with display: inline-block,
> which still displays "foo."
>
> Any advice appreciated!

Nope, that's definitely broken behavior.  There is no reason for #b to
not be visible if it has visibility:visible.

~TJ


More information about the webkit-dev mailing list