简体   繁体   中英

How to I use custom CSS with Bootstrap 4 and Rails 5

I am using bootstrap 4 and rails 5, I have used render :layout => false so that my main app layout isn't on my login page but I am using Bootstrap to style the login page which works. I have some custom css from the Bootstrap login page example and I don't know where to save it in my rails app, or how to make sure my login page (sessions#new) picks it up. Does anyone know?

Even if you put layout: false , Rails will continue to load the applications.scss. You can create a sass partial (if you're using sass) and import it in the application.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