javascript - Polymer change pseudo element with js -
i have following code paper-dropdown-menu
polymer. have somehow change content of pseudo-element each item of array, sofar have not been able find out how.
in below code, says content:"{{item.code}}"
, of course not correct way of doing needs changed every possible value of code
in array.
<dom-module id="language-drop"> <style is="custom-style"> paper-item.lang:after{ content:"{{item.code}}"; color: var(--secondary-text-color); @apply(--paper-font-caption); position:absolute; right:20px; } </style> <template> <paper-dropdown-menu label="other"> <paper-listbox class="dropdown-content"> <template is="dom-repeat" items="{{languagechoice}}"> <paper-item class="lang">{{item.author}}</paper-item> </template> </paper-listbox> </paper-dropdown-menu-light> </template> <script> polymer({ is: 'language-drop', properties: { languagechoice: array } }); </script> </dom-module>
Comments
Post a Comment