dreamingechoes / bootstrap_sb_admin_base_v2

Rails gem of the Bootstrap based admin theme SB Admin 2.
http://dreamingechoes.github.io/bootstrap_sb_admin_base_v2
MIT License
63 stars 23 forks source link

Changing template colors #12

Open nowakov opened 7 years ago

nowakov commented 7 years ago

Is there a way to override sb admin's global variables? What is the encouraged approach on styling the template?

dreamingechoes commented 7 years ago

Hi @nowakov!

There's no way to override the variables of the template directly, but maybe you can play with the concept of specificity to create your custom theme over the sb_admin_2 one.

For example, let's pretend that you want to change the color of the top navbar links, and you create your custom stylesheet file which looks like:

.navbar-top-links {
  li {
    a {
      color: #your_favourite_color;
    }
  }
}

# More cool styling here...

you can require your custom stylesheet file just after the sb_admin_base file on your application.css like:

*= require bootstrap_sb_admin_base_v2
*= require your_custom_stylesheet_file

and it should show the navbar links with the color you have defined. If you try this and doesn't work let me know in order to see other possibilities.

Greetings! 😄