【发布时间】:2017-07-03 01:31:09
【问题描述】:
我想让我的样式dom-module,因为我喜欢使用@apply css 指令,我希望我可以做类似的事情:
<dom-module id="my-styles">
<template>
<style>
html {
--big-title: {
font-size: 1.3em;
text-transform: UPPERCASE;
}
}
</style>
</template>>
</dom-module>
但如果我这样做:
<dom-module id="my-element">
<template>
<style include="my-styles">
h1 {
@apply --big-title;
}
</style>
...
</template>
</dom-module>
很遗憾,这行不通。我不确定为什么。我的问题是我可以将@apply 指令与样式dom-module 解决方案结合使用吗?
【问题讨论】:
标签: css polymer polymer-2.x