Change Bootstrap table font colors when swapping Nebular theme

Discussão em 'Angular' iniciado por Fel, Agosto 21, 2025.

  1. Fel

    Fel Guest

    I'm using Akveo Nebular UI library and Bootstrap in an Angular application and everything looks perfect until I change the theme at runtime. Basically, the Bootstrap tables don't change the font color so they're unreadable. For example, this is how a table looks like with the default theme:

    [​IMG]

    And this is the same table when I switch to dark theme:

    [​IMG]

    I followed Nebular's article found here and I modified the app.component.scss to add the following lines to customize the Bootstrap table styles when the theme is changed:

    @import '../../../../themes';

    @include nb-install-component {
    table.table {
    font-family: nb-theme(font-family-primary);
    color: nb-theme(text-basic-color);
    }
    }


    Hovever, it doesn't change anything. I've realized that, if I modify the SCSS file of a component that has any table in it, the new styles are applied. But I have tables in more than 15 components, so it would be a pain to add the code above to each of them and maintain possible style changes.

    Continue reading...

Compartilhe esta Página