Colors in Bootstrap custom download?

若如初见. 提交于 2019-12-31 05:05:07

问题


So I'm using the Bootstrap Customize and Download page to generate a version of the Bootstrap files with custom colors. I got the idea that I wanted to add some other colors (e.g. @purpleLight) to make upkeep of the site design easier, so I look through the downloaded contents the site generates, and my customizations don't appear to be anywhere, let alone somewhere for me to add others. Here's what comes in the bootstrap.zip the site spits out:

  • css
    • bootstrap.css
    • bootstrap.min.css
  • img
    • glyphicons-halflings.png
    • glyphicons-halflings-white.png
  • js
    • bootstrap.js
    • bootstrap.min.js

...and that's it. So, no colors anywhere in these files as far as I can tell. No LESS files included in the download. Am I doing something wrong? Is the site doing something wrong? Am I just not seeing something that is in fact there? To the best of my diffing abilities, the downloads seem identical regardless of the customization options I choose...

And, pending whose messing up here, what would be the alternative best way for me to customize a color palette for my Bootstrap site?


回答1:


You can't add more LESS variables with the custom download tool. You can only redefine the values of the existing variables. Upon download, the tool compiles with those set variables but since you don't get the LESS files, you won't be able to add more variables afterwards, like @purpleLight you mentioned.

If you want to extend Bootstrap with more LESS variables, you have to download the full source and compile your css from the included LESS files. There's a file variables.less in the less/ folder where can add your @purpleLight.



来源:https://stackoverflow.com/questions/11125447/colors-in-bootstrap-custom-download

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!