[英]Where is the bootstrap-sass color codes?
I'm using bootstrap-sass (3.2.0.0). 我正在使用bootstrap-sass(3.2.0.0)。 I was following a tutorial and I used the following code in app/assets/stylesheets/scaffolds.css.scss
. 我正在学习教程,并且在app/assets/stylesheets/scaffolds.css.scss
使用了以下代码。
.timestamp {
color: $grayLight;
}
The result was an error indicating that undefied valuable $grayLight. 结果是一个错误,指示未定义的有价值的$ grayLight。 And I found a link says the naming has changed from $grayLight to $gray-light. 我发现一个链接说,命名已从$ grayLight更改为$ gray-light。
I sought on the internet for the documentation regarding to the defined colors but I failed to found it. 我在互联网上寻求有关定义的颜色的文档,但没有找到。 I think this kind of documentation should exist. 我认为这种文档应该存在。 Totally no idea which color code can be used. 完全不知道可以使用哪种颜色代码。
Even I used find . -type f -exec grep -H "gray-light" {} \\;
甚至我也用过find . -type f -exec grep -H "gray-light" {} \\;
find . -type f -exec grep -H "gray-light" {} \\;
there is no such file defines the color code. 没有此类文件定义颜色代码。
First of all, make sure you're browsing the gem source... bundle open bootstrap-sass
. 首先,确保您正在浏览gem来源... bundle open bootstrap-sass
。 Then browse to: vendor/assets/stylesheets/bootstrap/_variables.scss 然后浏览到: vendor / assets / stylesheets / bootstrap / _variables.scss
Reproducing the relevant section here for your convenience: 为了方便起见,在此处复制相关部分:
//== Colors
//
//## Gray and brand colors for use across Bootstrap.
$gray-darker: lighten(#000, 13.5%) !default; // #222
$gray-dark: lighten(#000, 20%) !default; // #333
$gray: lighten(#000, 33.5%) !default; // #555
$gray-light: lighten(#000, 60%) !default; // #999
$gray-lighter: lighten(#000, 93.5%) !default; // #eee
Note: this is from bootstrap-sass v3.1.0.2 so may have changed in 3.2.0.0 somewhat. 注意:这来自bootstrap-sass v3.1.0.2,因此在3.2.0.0中可能有所更改。
I find the bootstrap-sass gem's SCSS files very easy to read so I jump into the source on this one quite often. 我发现bootstrap-sass gem的SCSS文件非常易于阅读,因此我经常跳入这一源。 Good luck! 祝好运!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.