dreamingechoes / bootstrap_sb_admin_base_v2

Rails gem of the Bootstrap based admin theme SB Admin 2.

Home Page:http://dreamingechoes.github.io/bootstrap_sb_admin_base_v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing template colors

nowakov opened this issue · comments

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

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! 😄