星云主题覆盖主题变量

时间:2019-03-10 13:03:21

标签: 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)组件的颜色完全不变。我在做什么错了?

非常感谢!

1 个答案:

答案 0 :(得分:0)

您在这里:

$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

相关问题