Let Me Tink About It
Let Me Tink About It

Reputation: 16132

Polymer 1.0: Referencing a path for an imported style sheet using a custom-style

I'm trying to understand this example.

Code
<link rel="import" href="../../styles/app-theme.html"> <!--Line 22-->
...
<style is="custom-style" include="app-theme"></style> <!--Line 32-->

Question

In line 32, does the app-theme value for the include attribute refer to the app-theme.html import in line 22? If so, how does the compiler discover the path of the app-theme.html import if it's not included somewhere in the <style> tag's set of attributes?

Upvotes: 0

Views: 29

Answers (1)

Neil John Ramal
Neil John Ramal

Reputation: 3734

It really just references the id of the dom-module with the style you want to use.

<dom-module id="app-theme">
  <template>
    <style>
     .red { color: red; }
    </style> 
  </template>
</dom-module>

Upvotes: 1

Related Questions