简体   繁体   中英

Is there a way to use bootstrap 4 with Sass instead of SCSS?

I've just installed Bootstrap 4 to my Rails 6 app, and noticed that all files are .SCSS

Is there a way to make Bootstrap use Sass ?

I use Sass, because it's much easier without all these brackets and semicolons...

There have been projects for past versions of Bootstrap to convert them to SASS syntax, (such as https://github.com/twbs/bootstrap-sass for Bootstrap 3) but I'm unaware of any such projects for Bootstrap 4.

Now I also use SASS over SCSS in my own projects, but what you need to remember is that it doesn't matter whether a library like Bootstrap uses SCSS or SASS. You can still write your own files in SASS syntax and import variables from SCSS files. That's the whole point of SASS/SCSS in general. Just write your files in SASS, and it doesn't matter whether or not Bootstrap is using SCSS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM