Polymer Paper-Item - 无法更改<paper-item>的灰色选定背景

时间:2017-03-23 04:27:19

标签: polymer

一旦在模板中使用,我似乎无法更改所选的灰色背景颜色。我可以调用混合并在模板中不使用时更改所选的背景颜色。请帮忙!

  <autocomplete-suggestions
id="filter-suggestions"
for="filter-input"
source="[[suggestionsSource]]"
min-length="0"
text-property="title">

<template autocomplete-custom-template>

  <paper-item class="suggestion" on-tap="_onSelect" id$="[[_getSuggestionId(index)]]">

  <style is="custom-style">
  :root {
    --paper-item: {
      font-weight: 300;
      font-family: 'Muli', Helvetica, Arial, 'Lucida Grande', sans-serif !important;
      -webkit-font-smoothing: initial;
      color:#3F5364;
    };
    --paper-item-focused: {
    background: white;
    };
    --paper-item-focused-before: {
    background: white;
    };
  }
  </style>

    <p class= "suggestion-type">
      [[item.title]]
    </p>
    <template is="dom-if" if="[[item.description]]" restamp="true">
      <small class="suggestion-value">
      [[item.description]]</small>
    </template>

  </paper-item>

</template>

0 个答案:

没有答案