Bootstrap 4 release - create custom css

一世执手 提交于 2019-12-06 04:19:54

As of Bootstrap 4 beta, they moved away from Gulp and over to Webpack, but there are other ways you can generate CSS from SASS.

To create a custom CSS, you need a SASS compiler such as node-sass or Webpack SASS, or gulp SASS to compile the SCSS to CSS. Then change the whatever SASS variables as needed for the customizations in the custom.scss file . The changes should be made before you @import bootstrap in the custom.scss file to override the default Bootstrap variables.

If you prefer not to work directly with the SASS variables, or don't want to set-up your own SASS compiler, there are tools available that make the customization process easier. I created themestr.app which is a custom CSS builder that provides a simple UI to make the changes and generates the custom.scss or custom.css for download.

More info:
How to extend/modify (customize) Bootstrap 4 with SASS
How to customize Bootstrap 4

As ZimSystem stated, Webpack is the new way forward with Bootstrap. I found, after hitting the jump, the documentation was a bit lacking.

More digging led me to https://github.com/twbs/bootstrap/issues/24370 and the issue author's repo https://github.com/xdvarpunen/webpackboot which has what you need to get going with sass, npm webpack and bootstrap.

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