Themes

Choosing default themes

There are a few themes(skins) for sidebar and navbar.

By default sidebar-light and navbar-blue themes are included in ace.css .
In demo when you choose a different theme from settings box , ace-themes.css is loaded.

But if you want to use a theme in your app other than the default ones, it's recommended to compile ace.css using your chosen theme(s).
You should not use ace-themes.css because it is a large file as it contains all sidebar and navbar themes.

Open scss/ace-default-themes.scss and add or remove the theme(s) you want.

👉 Note: For Dark Colored Sidebars such as .sidebar-purple you should include and compile both sidebar-color and the sidebar you want. (Except for .sidebar-dark and .sidebar-dark2)

scss
$my-navbar-themes: (
    "blue": $navbar-blue
);

$my-sidebar-themes: (
    "white": $sidebar-white
);
scss
$my-sidebar-themes: (
    "dark": $sidebar-dark
);
scss
// OR if you want a dark sidebar like *sidebar-purple*
$my-sidebar-themes: (
    "color": $sidebar-color, // sidebar-color should be included as well
    "purple": $sidebar-purple
);

Then rebuild ace.css

And in your HTML change navbar and sidebar theme like this:

html
<div id="navbar" class="navbar navbar-blue navbar-fixed">
 <!-- navbar content -->
</div>
html
<div id="sidebar" class="sidebar sidebar-color sidebar-blue sidebar-fixed expandable">
 <!-- sidebar content -->
</div>

Sidebar themes are as follows:

Light colors

  • light which is the default sidebar theme in ace.css and used in Dashboard and most pages
  • white , white2 , white3 , white4
  • lightblue , lightblue2 , lightpurple . These are used along with .sidebar-spaced

Dark colors

  • dark
  • dark2
  • blue
  • cadetblue
  • darkblue
  • darkcrimson
  • darkslateblue
  • darkslategrey
  • green
  • plum
  • purple
  • steelblue
  • gradient1
  • gradient2
  • gradient3
  • gradient4

After you rebuild ace.css using your chosen theme as mentioned above, you can use it like this:

html
<div id="sidebar" class="sidebar sidebar-white"> ... </div>
<div id="sidebar" class="sidebar sidebar-lightblue"> ... </div>
<div id="sidebar" class="sidebar sidebar-color sidebar-dark"> ... </div>
<div id="sidebar" class="sidebar sidebar-color sidebar-teal"> ... </div>

Customizing And Editing

If you want to change the colors and other values of a specific theme, you should edit scss/_sidebar-themes-variables.scss

You can customize each theme to change its colors or other features.
Many themes are extended from another theme. For example sidebar-white is extended from sidebar-light.

👉 Some of the options are:

border-color and shadow : some sidebars have a border on right (for example white sidebars), some have a shadow (for example the light sidebar), some have none (for example dark sidebars) .

With a shadow you can have the .active element cover the shadow by setting shadow-padding to 1px (or more) and result is like this:
Sidebar Shadow

But it's not possible with a border. So if you want a border and not a shadow:
Sidebdar Border

Then you should modify your theme values (in _sidebar-themes-variables.scss) like this:

scss
$sidebar-light: map-merge($sidebar-light-base, (
    'background-color': #f1f3f5,
    'border-color': #dbdfe2,
    'shadow': null,
    ....
));

However when active item covers sidebar's shadow in collapsed mode, it sometimes doesn't look good. And you can fix that by adding the following theme variable:

scss
$sidebar-light: map-merge($sidebar-light-base, (
    'background-color': #f7f7f7,
    'border-color': null,
    'shadow': (inset -1px 0 0 0 #dbdfe2),
    'shadow-padding': 1px,
    'shadow-padding-collapsed-disabled': true,
	// OR
	'shadow-padding-collapsed-active-on-right': true,//will show the active highligh border on right, when sidebar is collapsed and hovered
    ....
));

Sidebdar Shadow
or when active item highlight is on right: (Explained in Sidebar Nav Options)
Sidebdar Active On Right

If you want to add a 3D shadow to sidebar, you should add it to its .sidebar-inner child:

html
<div id="sidebar" class="sidebar sidebar-white">
  <div class="sidebar-inner shadow-sm">
      ...
  </div>
</div>


item-border-color : adds a border between sidebar items. Can be used with item-border-margin to specify distance from sides


Submenu Bullets

  • null disables it
  • 1 only shows it on hover
  • 2 only shows when item is .active
  • 3 shows it both on hover and when .active
  • set submenu-bullet-style to caret to change it from circle to triangle
scss
$sidebar-purple: (
    ...
    'submenu-bullets': 1,
    'submenu-bullet-style': caret  
    ...
);

Sidebar Link Hover Border

Sidebar Link Active Border

item-active-highlight-border . Sidebar item (LI.nav-item) border when .active:

Sidebar Item Active Border



In Ace's demo, when you change sidebar theme, some of the elements such as shortcut buttons are also changed.
These changes are not part of the theme. Instead their relevant class names are changed:
Sidebar Element Changes

Here for example the search icon's class name is changed from text-info to text-orange-l2 to match the selected sidebar theme

Navbar theming options are as follows:

Light colors

  • white , white2
  • light
  • lightblue
  • lightpurple
  • lightgreen
  • lightgrey

Dark colors

  • dark
  • blue. It's the default navbar color included in ace.css and used in Dashboard and most pages
  • darkblue
  • skyblue
  • cadetblue
  • purple
  • plum
  • teal
  • green
  • darkgreen
  • orange
  • brown
  • slategrey
  • secondary

If you want to change the colors and other values of a theme, you should edit scss/_navbar-themes-variables.scss

Then you should rebuild ace.css using your chosen theme and use it like this:

html
<div class="navbar navbar-white"> ... </div>

<div class="navbar navbar-lightblue"> ... </div>

<div class="navbar navbar-purple"> ... </div>

In Ace's demo, when you change navbar theme, some of the elements are also changed.
These changes are not part of the theme. Instead their relevant class names are changed.

Navbar Element Changes

As an example:

html
<a href="#" class="dropdown-toggle nav-link pl-lg-3 pr-lg-4">
    ...
</a>

↓ BECOMES ↓

html
<a href="#" class="dropdown-toggle btn btn-warning px-lg-3 d-none d-lg-flex">
    ...
</a>

.nav-link class is replaced by .btn.btn-warning.

Also in the second theme (lightblue), the .btn is displayed only on large (desktop) devices by applying d-none d-lg-flex .
In small devices a sibling is (inserted and) displayed as well as an orange icon to match the look and feel of the large screen:

Navbar Element Changes

html
<!-- Show the "orange" button in large screens -->
<a href="#" class="dropdown-toggle btn btn-warning px-lg-3 d-none d-lg-flex">
    ...
</a>
<!-- 
    And in small devices show a normal ".nav-link"
    and place an "orange" icon inside it   
-->
<a href="#" class="dropdown-toggle nav-link d-lg-none">    
    <i class="fa fa-bell icon-animated-bell 
        btn-warning radius-round w-4 h-4 text-center pt-2 text-110">
    </i>
    ...
</a>

Body

There are some background image options for body element. They are visible only in boxed layout
The following are available:

  • body-img1
  • body-img2
html
<body class="body-img1">
...
</body>

You can disable these by setting $body-bg-themes to false in ace-features.scss .
You can also change the values in scss/ace-themes . Search for $body-bg-themes in it

Content Area

Content area has a lightgrey background color by default. If you want another color for background such as "White" (as seen in default Dashboard and most pages), you can do it like this:

html
<div class="main-container bgc-white">
  ...
</div>
<!-- or other color -->
<div class="main-container bgc-secondary-l4">
  ...
</div>

If you want to use a custom background color for content area and you have sidebar arrows that point to .active item:

Active Item Arrow

you should make sure to add the following rule in your CSS so that the arrow color matches content area background:

css
.sidebar .nav.has-active-arrow .nav-item.active > .nav-link::after {
    border-right-color: #eee; /* put the new content background color here */
}