vaadin-context-menu
这个问题是关于名为3.0.0-alpha1的 ES6 Web 组件(与 Polymer 2.0 兼容) 。
在下面的屏幕截图中,我希望paper-item
标有“注销”的标签看起来与标有“编辑配置文件”和“首选项”的纸质项目相同。
具体来说,当不悬停时,我希望这三个都具有:
paper-item {
background-color: white;
font-weight: normal;
}
这是我的代码。
我的-el.html<vaadin-context-menu selector="button" open-on="click" close-on="none">
<template>
<style>
paper-item {
cursor: pointer;
--paper-item-focused: { /* Doesn't seem to work */
background-color: white; /* Doesn't seem to work */
font-weight: normal; /* Doesn't seem to work */
};
}
paper-item { /* Doesn't seem to work */
background-color: white; /* Doesn't seem to work */
font-weight: normal; /* Doesn't seem to work */
}
paper-item:hover {
background-color: var(--app-primary-color);
color: white;
}
</style>
<paper-listbox>
<paper-item>Edit Profile</paper-item>
<paper-item>Preferences</paper-item>
<hr />
<paper-item>Logout</paper-item>
</paper-listbox>
</template>
<button>Click Me</button>
</vaadin-context-menu>