I'd love to find out more details about the -webkit-inline-box property but I can't seem to find anything anywhere. I tried the normal channels of w3c, google, css-tricks bug I'm not coming up with anything. I'm thinking that it's old inherited code from flexbox.

Does anyone know the details of...

display: -webkit-inline-box;

?

有帮助吗?

解决方案

I'm thinking that it's old inherited code from flexbox.

You're correct.

Flexible boxes, defined by display: box and display: inline-box respectively, were old incarnations of what are now known as flex containers (display: flex and display: inline-flex).

They are described in this version of the Flexbox spec, but it doesn't say anything about these two display values other than

In CSS, flexible boxes (often referred to only as boxes in this specification) may be created by setting the ‘display’ property. A block-level box can be specified with a value of ‘box’ and an inline box can be specified using a value of inline-box.

Everything else is described by the box-* properties in the rest of that document.

Implementations and production sites still exist that use the old flexbox code, but it goes without saying that you should never have to use them today. Focus on writing CSS according to the latest Flexbox spec, which enjoys reasonable support by modern browsers and is on track for standardization.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top