问题在于网格中的“ .large-XXX .columns ”仅为“ @media screen ”定义:
基础/_variables.scss:98
$small: "only screen and (min-width: #{$small-screen})";
基础/组件/_grid.scss:153
@media #{$small} {
@for $i from 1 through $total-columns {
.large#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
}
...
}
所以我所做的就是在包含foundation/_variables.scss 之后添加一行来覆盖它:
// This includes all of the foundation global elements that are needed to work with any of the other files.
@import "foundation/variables";
$small: "screen and (min-width: #{$small-screen}), print";
当然,这仅适用于您不通过@import "foundation"自动包含所有基础,而是手动包含所有基础(即,取消注释 _foundation.scss 中的相应行)。