我试图通过在我的 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/