【问题标题】:Susyone no longer working as expected after updateSusyone 更新后不再按预期工作
【发布时间】:2015-01-18 15:31:42
【问题描述】:

我一直在使用@import "susyone"; 而不是@import "susy"; 运行susy-2.1.2。一切正常。我必须通过 GEM 更新 compass,这意味着 Sass 必须更新,这意味着 susy 也必须更新。所以现在我正在运行 susy-2.2.1。

我有这个 CSS:

.dropdown .susy_container{
    //Get ready for grids with bigger screen sizes
    $total-columns: 12;  // a 12-column grid
    $column-width: 100em;  // each column
    $gutter-width: 1em !global;  // gutters between columns
    $grid-padding: 0em !global ;
    @include container;
}

使用旧版本我会得到这个:

.dropdown .susy_container {
   max-width: 1211em;
   _width: 1211em;
   padding-left: 0em;
  padding-right: 0em;
  margin-left: auto;
  margin-right: auto;
}

有了新版本,我得到了这个:

.dropdown .susy_container {
  max-width: 59em;
  _width: 59em;
  padding-left: 0em;
  padding-right: 0em;
  margin-left: auto;
  margin-right: auto;
}

我在列之间也有奇怪的排水沟。我 100% 确定我正在使用 susyone.scss。

我希望我能回到旧版本的 susy,但我明白了:

Gem::LoadError on line ["2064"] of /Library/Ruby/Site/2.0.0/rubygems/specification.rb: Unable to activate susy-2.1.2, because sass-3.4.9 conflicts with sass (~> 3.3.0)

【问题讨论】:

  • 作为快速修复,您可以尝试 2.1.3 版本。根据changelog,它应该适用于 Sass 3.4,但与 2.1.2 相比,其他更改很少。
  • 我应该提到,我已经尝试过 2.1.3。

标签: sass susy-compass


【解决方案1】:

这不是 Susy 的变化,而是 Sass 的变化。看起来您需要所有设置上的!global 标志才能生效:

.dropdown .susy_container{
    //Get ready for grids with bigger screen sizes
    $total-columns: 12 !global;  // a 12-column grid
    $column-width: 100em !global;  // each column
    $gutter-width: 1em !global;  // gutters between columns
    $grid-padding: 0em !global ;
    @include container;
}

【讨论】:

  • 谢谢。我觉得用 scss 切换到 !global 是很久以前的事了,因为我在 Bootstrap 上遇到了这个问题。也许 susy 刚刚开始关心 2.1.3。
  • 不确定发生了什么变化。这不是我们在 Susy 内部所能控制的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-05-28
  • 2019-03-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多