聚合物:不能使用自定义属性mixin覆盖默认字体

时间:2017-09-05 02:36:26

标签: polymer

当引用任何纸质字体mixin时,不能使用自定义属性mixin覆盖默认字体(Roboto),即:@apply( - paper-font-sunhead);因为嵌套的CSS变量看起来很混乱。

实例: https://codepen.io/rhysyg03/pen/YxgYQp?editors=1100

<custom-style>
    <style>
    .my-class {
      --paper-font-common-base: {
                font-family: Georgia, Serif;
              -webkit-font-smoothing: antialiased;
            }
    }
    </style>
</custom-style>

嵌套CSS变量时,在此示例中:

  • font-family:var( - paper-font-subhead _-_ font-family)
  • 返回
  • font-family:var( - paper-font-common-base _-_ font-family)

- paper-font-subhead _-_ font-family变量引用同一声明(html)中的变量,即使它已被覆盖(.my-class)。

请帮助:)

0 个答案:

没有答案
相关问题