早上好,
我期望通过几行代码就可以包含下面解释的Infragitics主题之一。 (https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/examples.html)
我正在“默认主题”部分中进行工作。我使用Infragistics angular-cli创建了一个新的角度项目。我向HTML添加了一个按钮(并支持模块导入),如下所示。
<button igxButton="raised">Sign In</button>
现在,我按照教程上的说明进行操作,并添加以下内容:
// import first the IgniteUI themes library
@import "~igniteui-angular/lib/core/styles/themes/index";
// Don't forget to include the igx-core first
@include igx-core();
// the default color palette is passed to the global theme
@include igx-theme($default-palette);
我仍然看到上面的“粉红色”按钮。但是,本教程声称并显示为灰色。因此,我在StackBlitz中打开了教程示例,我非常困惑。
他们已经将额外的样式手动添加到scss以获得灰色效果???
.addProdBtn.igx-button--raised{
margin-bottom: 5px;
background-color: lightgrey;
color: black;
&:hover {
background-color: rgba(0, 0, 0, 0.26)
}
}
如果我拿走上面的文章,那么样本将像我的一样回到粉红色?
所以我很困惑。我认为默认主题的思想是使您无需进行大量样式即可轻松获得一致的外观和感觉???
[我也将此问题交叉发布在Infrangistics论坛上,并得到与上述Konstantin Dinev类似的回复。
该文档具有误导性,并且Infrangistics将会更新。