Css 用SASS定制基础5 我一直在尝试建立基金会5的困难,所以我可以用SASS定制它。根据ZURB基金会,使用SASS是最容易定制的方法,但由于某种原因,没有任何有用的文档。
我到处搜索,找到了一些信息,最终找到了一些有用的东西,这样当我修改主SCSS文件时,它就会创建一个相应的CSS文件。然而,无论我在我的SCSS文件中添加什么变量来尝试修改颜色等,它似乎都没有效果。我在某个地方读了一些东西,从_settings.scss文件中复制您想要更改的变量,并将它们输入到您自己的scss文件中,然后修改这些值。有人能帮我吗?这让我发疯。 我的文件夹/文件设置为:Css 用SASS定制基础5 我一直在尝试建立基金会5的困难,所以我可以用SASS定制它。根据ZURB基金会,使用SASS是最容易定制的方法,但由于某种原因,没有任何有用的文档。,css,sass,zurb-foundation,compass-sass,Css,Sass,Zurb Foundation,Compass Sass,我到处搜索,找到了一些信息,最终找到了一些有用的东西,这样当我修改主SCSS文件时,它就会创建一个相应的CSS文件。然而,无论我在我的SCSS文件中添加什么变量来尝试修改颜色等,它似乎都没有效果。我在某个地方读了一些东西,从_settings.scss文件中复制您想要更改的变量,并将它们输入到您自己的scss文件中,然后修改这些值。有人能帮我吗?这让我发疯。 我的文件夹/文件设置为: /MyProject/ /CSS/ /foundation/ - foundation.cs
/MyProject/
/CSS/
/foundation/
- foundation.css
- normalise.css
- myfile.css
/SCSS/
/foundation/
/components/
-- _accordion.scss
-- _etc.scss (and the rest ofthe files in components)
-- _functions.scss
-- _settings.scss
- foundation.scss
- normalise.scss
- myfile.scss
- index.html
在myfile.scss中,我有:
@import 'foundation.scss';
@import 'normalize.scss';
$body-bg: #ccc;
$body-font-color: #000;
// $body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
// $body-font-weight: normal;
// $body-font-style: normal;
不管我在上面的文件中做了什么更改,myfile.css始终保持不变:
body {
background: white;
color: #222222;
padding: 0;
margin: 0;
font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
font-weight: normal;
font-style: normal;
line-height: 1;
position: relative;
cursor: default; }
我收到的错误消息是:
DEPRECATION WARNING: The return value of index() will change from "false" to
"null" in future versions of Sass. For compatibility, avoid using "== false" on
the return value. For example, instead of "@if index(...) == false", just write
"@if not index(...)".
on line of C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\foundation\_functions.scss, in `exports'
from line 296 of C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\foundation\components\_global.scss
from line 5 of C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\foundation\components\_accordion.scss
from line 10 of C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\foundation.scss
from line 11 of C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\store.scss
DEPRECATION WARNING on line 13 of C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\foundation\_functions.scss:
Assigning to global variable "$modules" by default is deprecated.
In future versions of Sass, this will create a new local variable.
If you want to assign to the global variable, use "$modules: append($modules, $name) !global" instead.
Note that this will be incompatible with Sass 3.2.
DEPRECATION WARNING on line 18 of C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\foundation\components\_block-grid.scss:
Assigning to global variable "$block-grid-default-spacing" by default is deprecated.
In future versions of Sass, this will create a new local variable.
If you want to assign to the global variable, use "$block-grid-default-spacing: $column-gutter !global" instead.
Note that this will be incompatible with Sass 3.2.
Done.
首先需要设置变量:
$body-bg: #ccc;
$body-font-color: #000;
// $body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
// $body-font-weight: normal;
// $body-font-style: normal;
@import 'foundation.scss';
@import 'normalize.scss';
不值得注意的警告没有什么值得担心的,因为它与你的问题无关(它们应该由基金会维护者来确定)。非常感谢,我现在可能真的有点收获了!