例えば、あなたは親の赤を見るべきではありませんparent: 0 0 auto
は、その子コンテンツの自動幅に対して親のサイズを変更しているので、ここでは行います。コンテンツの実際の幅は10ピクセルなので、自動的にサイズ変更すると親が10ピクセルにならないはずです。`flex-basis:auto`子が` flex-basis:auto`のとき、子が `flex-basis:10px`のときのように親をサイズします
body{
display:flex;
}
#parent {
flex: 0 0 auto;
background-color: red;
}
#child {
flex: 0 0 10px;
background-color: grey;
}
div{ display:flex; min-width:0; min-height:0; overflow:hidden; } /*There's some weirdness described here, http://stackoverflow.com/questions/36247140/why-doesnt-flex-item-shrink-past-content-size where flex elements default to min-width:auto, which could have caused problems here, but this doesn't change anything, so apparently this is not the issue*/
<div id="parent">
<div id="child">childcontents</div>
</div>
これはFirefoxとクロームで発生するので、おそらくこれは何とか正しいであることが判明する予定です。私はそれを止めることができるように、どのように知りたいのですか。