Ngx-admin: Light theme - Change banner or Nav header color

Created on 20 Oct 2017  路  5Comments  路  Source: akveo/ngx-admin

Wondering if there is a way for me to change the banner background color. I have defaulted to Light theme but looking to have a blue banner. Couldn't find any documentation around overriding parts of the theme.

faq

Most helpful comment

Hi,
this is not to hard, go to: @theme/styles/themes.scss

There you have 2 blocks to register theme variables, the first one for default and the second one for cosmic theme.

Since the variable is out of the box declared from nebular component you have to overwrite it like this:

$nb-themes: nb-register-theme((
 // app wise variables for each theme
  sidebar-header-gap: 2rem,
  sidebar-header-height: initial,
  layout-content-width: 1400px,
        header-bg: blue, //header-bg is the variable you need

  font-main: Roboto,
  font-secondary: Exo,
), default, default);

Here is the documentation for it https://akveo.github.io/nebular/#/docs/guides/enabling-theme-system

If you want to know which variables come out of the box look under: node_modules/@nebular/theme/styles/themes/_default.scss or _comics.scss

All 5 comments

Hi,
this is not to hard, go to: @theme/styles/themes.scss

There you have 2 blocks to register theme variables, the first one for default and the second one for cosmic theme.

Since the variable is out of the box declared from nebular component you have to overwrite it like this:

$nb-themes: nb-register-theme((
 // app wise variables for each theme
  sidebar-header-gap: 2rem,
  sidebar-header-height: initial,
  layout-content-width: 1400px,
        header-bg: blue, //header-bg is the variable you need

  font-main: Roboto,
  font-secondary: Exo,
), default, default);

Here is the documentation for it https://akveo.github.io/nebular/#/docs/guides/enabling-theme-system

If you want to know which variables come out of the box look under: node_modules/@nebular/theme/styles/themes/_default.scss or _comics.scss

Hey @darklinki, many thanks for your help!
@gamefundas more documentation on topic
1 https://akveo.github.io/nebular/#/docs/concepts/theme-system
2 https://akveo.github.io/nebular/#/docs/themes/default

Awesome, tried and it worked.
Thanks @darklinki and @nnixaa

Is there any way to change colors outside node_modules? I'm working with git and node_modules is in .gitignore

@florarceguet
I have the same question as you did. Did you find any solution?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mignam picture mignam  路  3Comments

nsankaranarayanan picture nsankaranarayanan  路  3Comments

AZm1n picture AZm1n  路  4Comments

igorls picture igorls  路  3Comments

burtonator picture burtonator  路  3Comments