为什么它在 Chrome(版本 121 且不仅如此)中是一个错误,repeat(-10, 1fr)
但repeat(calc(-10), 1fr)
行为却像 1 一样?对于其他非正数也是如此。我期望行为是一样的......
section {
border: 1px solid orange;
background: antiquewhite;
display: grid;
padding: .5em;
gap: .5em;
}
section + section {
margin-top: 1em;
}
.a {
grid-template-columns: 1fr repeat(-10, 1fr) 1fr;
}
.b {
grid-template-columns: 1fr repeat(calc(-10), 1fr) 1fr;
}
div {
height: 1em;
background: gray;
}
<section class="a">
<div></div>
<div></div>
<div></div>
<div></div>
</section>
<section class="b">
<div></div>
<div></div>
<div></div>
<div></div>
</section>