首页 > 解决方案 > Infragistics 主题无法按 *I* 预期工作。未应用默认主题

问题描述

早上好,

我期望通过几行代码,我可以包含此处解释的 Infragitics 主题之一。(https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/examples.html

我正在“默认主题”部分工作。我使用 Infragistics angular-cli 创建了一个新的 angular 项目。我像这样在 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)
    }
}

如果我把上面的 scss 拿走,那么样品就会像我的一样变回粉红色???

所以我很困惑。我认为默认主题的想法是让您轻松获得一致的外观和感觉,而不必做一堆样式???

标签: angularinfragistics

解决方案


我还在 Infragistics 论坛上交叉发布了这个问题,并得到了与上面的 Konstantin Diev 类似的回复。

该文档具有误导性,Infragistics 将进行更新。


推荐阅读