Nebular 主题覆盖主题变量

标签 nebular

我试图通过在我的 theme.scss 文件中设置相应的变量来覆盖企业主题变量(nb-action 颜色)。

看起来如下:

@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/corporate';
$theme: ( actions-fg:#000000, actions-bg: #000000, actions-separator: #000000, color-fg: #000000, );
$nb-themes: nb-register-theme(( $theme), corporate, default);

问题是 nb-action(s) 组件的颜色根本没有改变。我做错了什么?

提前致谢!

最佳答案

给你:

$nb-themes: nb-register-theme((
  // add your variables here like:
  actions-fg:#000000,
  actions-bg: #000000,
  actions-separator: #000000,
  color-fg: #000000,
), corporate, corporate);

并且不要忘记更改 NbThemeModule.forRoot({ name: 'corporate' }) 部分。 这是一个完整的例子:https://stackblitz.com/edit/github-kafw6m?file=src/themes.scss

关于Nebular 主题覆盖主题变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55087947/

相关文章:

angular - 如何修复错误 Error : Default pack is not registered in Nebular

angular - <nb-tab> 如何在切换选项卡时调用 nebular nb-tab 中的用户定义函数

angular - 如何在 Angular Nebular 主题中创建响应式 TopNav?

icons - @nebular 自定义菜单 (NbMenuComponent) html 不起作用

angular - 在 Nebular 中默认选中 true?

angular - 星云对话服务中的 NullInjectorError : No provider for NbDialogRef!

angular - 激活星云主题选项卡

css - Angular 和 ng2-智能表 : Multi selectmode checkbox disable