Polymer 1.0:使用自定义样式引用导入样式 sheet 的路径
Polymer 1.0: Referencing a path for an imported style sheet using a custom-style
I'm trying to understand this example.
代码
<link rel="import" href="../../styles/app-theme.html"> <!--Line 22-->
...
<style is="custom-style" include="app-theme"></style> <!--Line 32-->
问题
在第 32 行中,include
属性的 app-theme
值是否引用第 22 行中的 app-theme.html
导入?如果是这样,如果 app-theme.html
导入的路径未包含在 <style>
标记的属性集中的某处,编译器将如何发现它?
它实际上只是引用了 dom-module
的 id 和你想要使用的样式。
<dom-module id="app-theme">
<template>
<style>
.red { color: red; }
</style>
</template>
</dom-module>
I'm trying to understand this example.
代码<link rel="import" href="../../styles/app-theme.html"> <!--Line 22-->
...
<style is="custom-style" include="app-theme"></style> <!--Line 32-->
问题
在第 32 行中,include
属性的 app-theme
值是否引用第 22 行中的 app-theme.html
导入?如果是这样,如果 app-theme.html
导入的路径未包含在 <style>
标记的属性集中的某处,编译器将如何发现它?
它实际上只是引用了 dom-module
的 id 和你想要使用的样式。
<dom-module id="app-theme">
<template>
<style>
.red { color: red; }
</style>
</template>
</dom-module>