nebular
nebular copied to clipboard
Theme is not a map.
Issue type
I'm submitting a ... (check one with "x")
- [x] bug report
- [ ] feature request
Issue description
Current behavior:
After trying to register a custom theme with I get the following error when running ng serve
✘ [ERROR] $map: nb-register-theme ((color-primary-300: #56D1A4), default, default) is not a map.
41 │ $theme: map.get(theming-variables.$nb-themes, $name);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
node_modules/@nebular/theme/styles/core/theming/_register.scss 41:11 nb-get-registered-theme()
node_modules/@nebular/theme/styles/core/theming/_install.scss 126:55 nb-install-global-with-css-props()
node_modules/@nebular/theme/styles/core/theming/_install.scss 145:5 nb-install()
src/app/@theme/styles/styles.scss 29:1 root stylesheet [plugin angular-sass]
Expected behavior:
Variables, defined in nb-register-theme should be applied to the parent theme. ng serve should run without errors.
Steps to reproduce:
Imported nebular theme into my themes.scss and registered a theme, followed by the Docs.
Related code:
themes.scss
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes';
$nb-themes: nb-register-theme ( (
color-primary-300: $brand-color-primary
) , default, default);
styles.scss
@use 'themes' as *;
@use '@nebular/theme/styles/globals' as *;
@import '@nebular/theme/styles/core/mixins';
@import '@nebular/auth/styles/globals';
@import 'bootstrap/scss/bootstrap';
@import 'bootstrap/scss/functions';
@import 'bootstrap/scss/variables';
@import 'bootstrap/scss/mixins';
@import 'bootstrap/scss/grid';
@import './pace.theme';
@include nb-install() {
// framework global styles
@include nb-theme-global();
@include nb-auth-global();
// loading progress bar
@include ngx-pace-theme();
}
Other information:
npm, node, OS, Browser
yarn version: 1.22.19
node Version: v18.17.1
macOS Sonoma (14.1)
Angular, Nebular
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
@angular/[email protected]
[email protected]
@nebular/[email protected]
@nebular/[email protected]
@nebular/[email protected]