[英]Akveo Nebular Angular Theme
I'm trying to ovewrite some styling of Accordion component from Nebular but it doesn't work if I enable multiple themes mode.我正在尝试覆盖 Nebular 的 Accordion 组件的一些样式,但如果我启用了多个主题模式,它就不起作用。
If I set component styling without multiple themes support, it does work:如果我在没有多个主题支持的情况下设置组件样式,它确实有效:
@import "../../@theme/styles/themes.scss";
$border: red;
.contato {
margin-bottom: 5px !important;
}
nb-accordion nb-accordion-item:last-child.collapsed nb-accordion-item-header {
border-radius: 5px;
background-color: $border !important;
}
But if I enable multiple themes according to instructions in: https://akveo.github.io/nebular/docs/design-system/use-theme-variables#access-with-multiples-theme-mode it doesn't work:但是,如果我根据以下说明启用多个主题: https : //akveo.github.io/nebular/docs/design-system/use-theme-variables#access-with-multiples-theme-mode它不起作用:
@import "../../@theme/styles/themes.scss";
@include nb-install-component {
$border: nb-theme(background-alternative-color-4);
.contato {
margin-bottom: 5px !important;
}
nb-accordion nb-accordion-item:last-child.collapsed nb-accordion-item-header {
border-radius: 5px;
background-color: $border !important;
}
}
Component's background color keeps unchanged.组件的背景颜色保持不变。
What's wrong?怎么了? Do I need to enable something else?我需要启用其他功能吗?
Thanks,谢谢,
Adding ::ng-deep to css classes works for me:将 ::ng-deep 添加到 css 类对我有用:
@import "../../@theme/styles/themes.scss";
@include nb-install-component {
$border: nb-theme(background-alternative-color-4);
::ng-deep .contato {
margin-bottom: 5px !important;
}
::ng-deep nb-accordion nb-accordion-item:last-child.collapsed nb-accordion-item-header {
border-radius: 5px;
background-color: $border !important;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.