| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 @license | |
| 3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | |
| 4 This code may only be used under the BSD style license found at http://polym
er.github.io/LICENSE.txt | |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS
.txt | |
| 6 The complete set of contributors may be found at http://polymer.github.io/CO
NTRIBUTORS.txt | |
| 7 Code distributed by Google as part of the polymer project is also | |
| 8 subject to an additional IP rights grant found at http://polymer.github.io/P
ATENTS.txt | |
| 9 --> | |
| 10 <link rel="import" href="core-style.html"> | |
| 11 | |
| 12 <script> | |
| 13 | |
| 14 CoreStyle.g.theme = { | |
| 15 colorOne: '#abcdef', | |
| 16 colorTwo: '#123456', | |
| 17 colorThree: '#224433' | |
| 18 } | |
| 19 </script> | |
| 20 | |
| 21 <core-style id="main"> | |
| 22 body { | |
| 23 font-family: sans-serif; | |
| 24 } | |
| 25 | |
| 26 section { | |
| 27 overflow: auto; | |
| 28 } | |
| 29 | |
| 30 button { | |
| 31 border: 1px solid {{g.theme.colorOne | cycle(-50)}}; | |
| 32 border-radius: 4px; | |
| 33 background-color: {{g.theme.colorOne}}; | |
| 34 color: {{g.theme.colorTwo}}; | |
| 35 } | |
| 36 | |
| 37 button:active { | |
| 38 border: 1px solid {{g.theme.colorTwo | cycle(50)}}; | |
| 39 border-radius: 4px; | |
| 40 background-color: {{g.theme.colorTwo}}; | |
| 41 color: {{g.theme.colorOne}}; | |
| 42 } | |
| 43 | |
| 44 <template repeat="{{item in g.items}}"> | |
| 45 my-panel:nth-of-type({{item+1}}) { | |
| 46 background-color: {{ g.theme.colorThree | cycle(item * -1) }}; | |
| 47 } | |
| 48 </template> | |
| 49 </core-style> | |
| 50 | |
| 51 <core-style id="my-toolbar"> | |
| 52 :host { | |
| 53 border-bottom: 8px solid {{g.theme.colorOne}}; | |
| 54 color: {{g.theme.colorOne | cycle(100)}}; | |
| 55 background-color: {{g.theme.colorTwo}}; | |
| 56 } | |
| 57 </core-style> | |
| 58 | |
| 59 <core-style id="my-panel"> | |
| 60 :host { | |
| 61 box-sizing: border-box; | |
| 62 background-color: {{g.theme.colorOne}}; | |
| 63 border: 8px solid {{g.theme.colorOne | cycle(50)}}; | |
| 64 color: {{g.theme.colorOne | cycle(-100)}}; | |
| 65 } | |
| 66 | |
| 67 :host(:nth-of-type(2n + 1)) { | |
| 68 background-color: {{g.theme.colorTwo}}; | |
| 69 border: 8px solid {{g.theme.colorTwo | cycle(-50)}}; | |
| 70 color: {{g.theme.colorTwo | cycle(100)}} | |
| 71 } | |
| 72 | |
| 73 </core-style> | |
| OLD | NEW |