【问题标题】:Change primary color in materialize css在物化 css 中更改原色
【发布时间】:2016-02-21 21:54:35
【问题描述】:

我正在尝试使用 kong 仪表板 (https://github.com/PGBI/kong-dashboard)。我想通过使用另一个 SCSS 文件来更改使用 GULP JS 实现的原色。我不想更改由 bower 或 npm 拉出的 _variables.scss。

有什么想法吗?

【问题讨论】:

    标签: sass npm gulp gulp-sass kong


    【解决方案1】:

    我添加了添加您自己的原色的功能。提交了一个拉取请求并被接受。只需在 app.scss 中设置原色即可。

    【讨论】:

    • 你能补充一些细节吗?也许是一个例子?
    【解决方案2】:

    可以在 Angular 的 .config 中使用 $mdThemingProvider 更改原色,这是一个示例

    $mdThemingProvider.theme("default")
            .primaryPalette('grey', {
                'default': '600', // by default use shade 400 from the pink palette for primary intentions
                'hue-1': '100', // use shade 100 for the <code>md-hue-1</code> class
                'hue-2': '600', // use shade 600 for the <code>md-hue-2</code> class
                'hue-3': 'A100' // use shade A100 for the <code>md-hue-3</code> class
            })
    

    https://material.angularjs.org/latest/Theming/03_configuring_a_theme

    您的应用的所有颜色都可以在那里设置

    【讨论】:

    • 嗨,我可以使用 materialize 本身进行更改。我提交了一个拉取请求并被接受了:) 谢谢
    猜你喜欢
    • 2017-07-01
    • 1970-01-01
    • 2020-01-22
    • 2018-03-03
    • 2018-02-09
    • 1970-01-01
    • 2017-05-29
    • 2017-07-12
    • 2019-09-08
    相关资源
    最近更新 更多