Foundation 5不再使用xlarge和xxlarge网格大小

Saw*_*oes 11 css sass media-queries zurb-foundation

问题

在Foundation 5.0.2及更高版本中,它不使用xlarge和xxlarge网格大小.他们在之前的5.0.0和5.0.1版本中工作过.

所以当从基础进入css文件时,它只会显示小,中,大网格大小.

显然,没有版本的Foundation 5具有xlarge和xxlarge块网格.

有没有办法让这些再次起作用?

测试

我去了他们的网站并下载了最新的5.1.1,它在foundation.css中也有同样的问题.

我自己用Sass构建它,并尝试手动添加覆盖变量:

// Here we define the lower and upper bounds for each media size
$small-range: 0em, 40em // 0, 640px
$medium-range: 40.063em, 64em // 641px, 1024px
$large-range: 64.063em, 90em // 1025px, 1440px
$xlarge-range: 90.063em, 120em // 1441px, 1920px
$xxlarge-range: 120.063em // 1921px

$screen: "only screen"

$landscape: "#{$screen} and (orientation: landscape)"
$portrait: "#{$screen} and (orientation: portrait)"

$small-up: $screen
$small-only: "#{$screen} and (max-width: #{upper-bound($small-range)})"

$medium-up: "#{$screen} and (min-width:#{lower-bound($medium-range)})"
$medium-only: "#{$screen} and (min-width:#{lower-bound($medium-range)}) and (max-width:#{upper-bound($medium-range)})"

$large-up: "#{$screen} and (min-width:#{lower-bound($large-range)})"
$large-only: "#{$screen} and (min-width:#{lower-bound($large-range)}) and (max-width:#{upper-bound($large-range)})"

$xlarge-up: "#{$screen} and (min-width:#{lower-bound($xlarge-range)})"
$xlarge-only: "#{$screen} and (min-width:#{lower-bound($xlarge-range)}) and (max-width:#{upper-bound($xlarge-range)})"

$xxlarge-up: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)})"
$xxlarge-only: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)}) and (max-width:#{upper-bound($xxlarge-range)})"
Run Code Online (Sandbox Code Playgroud)

jon*_*suh 24

在你的settings文件中取消注释并将以下内容设置为true(对我来说这是第32行):

$include-xl-html-grid-classes: true;
Run Code Online (Sandbox Code Playgroud)

然后重新编译,应该存在xlarge和xxlarge类.(确保摆脱你的覆盖,以防万一发生冲突)

  • @coorasse正确.对于xlarge和xxlarge块网格,您需要取消注释并在设置文件中将以下内容设置为true:`$ include-xl-html-block-grid-classes:true;` (2认同)

Ric*_*era 5

这在 Foundation 6 中已更改。_settings.scss您现在可以在其中找到$breakpoint-classes列表并添加所需的额外类。例如

$breakpoint-classes: (small medium large xlarge);
Run Code Online (Sandbox Code Playgroud)