CSS 如何获得 twitter bootstrap 3 颜色的列表?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21064615/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 01:36:03  来源:igfitidea点击:

How do I get a list of twitter bootstrap 3 colors?

csstwitter-bootstrap-3bootstrap-sass

提问by okysabeni

I'm using the twitter bootstrap sass 3.0.3.0 gem which should correspond to the latest twitter bootstrap 3.0.3. I was looking at the 'customize' section of the lESS variables but cannot find too many colors. How do I get a list of colors provided by bootstrap 3?

我正在使用 twitter bootstrap sass 3.0.3.0 gem,它应该对应于最新的 twitter bootstrap 3.0.3。我正在查看 lESS 变量的“自定义”部分,但找不到太多颜色。如何获得 bootstrap 3 提供的颜色列表?

For example, searching for blue bootstrap 3 docsreturns no result. Whereas searching for blue at bootsrap 2 docsshows the color blue.

例如,搜索 blue bootstrap 3 docs不会返回任何结果。而在bootsrap 2 文档中搜索 blue 会显示蓝色。

Thanks!

谢谢!

回答by erikrunia

They no longer name their classes or variables that way, because they are trying in release 3 to be more semantic, ie naming stuff for what it does rather than what it looks like. So @Blue might have become @btn-default-color.

他们不再以这种方式命名他们的类或变量,因为他们在第 3 版中尝试更加语义化,即命名内容是为了它的作用而不是它的外观。所以@Blue 可能变成了@btn-default-color。

That is better in the long run because your implementation might make it green, so @blue does not adequately describe it anymore. Unfortunately unless you know color hex codes this makes it a little harder.

从长远来看,这更好,因为您的实现可能会使其变为绿色,因此 @blue 不再充分描述它。不幸的是,除非您知道颜色十六进制代码,否则这会使它变得有点困难。

You can always (in a modern browser) right click the color you see and choose "inspect element", steal the color from the CSS code on the right hand side and then search for THAT color code in the docs.

您始终可以(在现代浏览器中)右键单击您看到的颜色并选择“检查元素”,从右侧的 CSS 代码中窃取颜色,然后在文档中搜索该颜色代码。

http://getbootstrap.com/customize/#less-variables

http://getbootstrap.com/customize/#less-variables