【问题标题】:Theming sencha touch list主题煎茶触摸列表
【发布时间】:2012-08-23 16:24:26
【问题描述】:

我想更改分组列表中标题的颜色。目前我有默认主题。我想我必须使用类似“$list-header-bg-color”的东西,但是:

  • 我可以在哪里使用它?我试着写一些类似的东西:

    $list-header-bg-color = '#CCC'

直接在“sencha-touch.css”文件的末尾,但它根本不起作用......有人可以解释一下它是如何工作的吗? (请举个小例子)。在此先感谢

【问题讨论】:

    标签: list themes sencha-touch extjs


    【解决方案1】:

    首先你需要安装 ruby​​

    然后安装 ruby​​ gems

    然后安装指南针

    然后打开您的应用程序 *.scss 文件(应该在 resources/sass/ 中)

    行后

    @import 'sencha-touch/default/all';
    

    包括你的行

    $list-header-bg-color = '#CCC'
    

    请注意,默认情况下此 var 的值为

    $list-header-bg-color: transparentize(saturate($base-color, 10%), .25);
    

    也许您可以更改基色以获得更“统一”的外观(取决于您想要做什么......)

    然后编译你的 scss 文件

    compass compile
    

    现在你的主题应该已经编译到你的 app.css 并且你的新颜色很好:)

    更多细节请查看我不久前写的这篇文章:sass-for-sencha-touch-2-windows-7

    【讨论】:

      【解决方案2】:

      Sencha 使用 SASS 进行主题化。所以该行应该放在 sencha-touch.scss 文件中。然后你应该用 compass 编译那个文件来得到一个 css 文件。观看此视频:

      也检查一下http://www.sencha.com/blog/sencha-touch-theme-contest-winners-announced/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-12-25
        • 2011-10-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-11-04
        • 1970-01-01
        相关资源
        最近更新 更多