This question is about the ES6 web component (compatible with Polymer 2.0) called vaadin-context-menu
version 3.0.0-alpha1.
In the below screen capture, I want the paper-item
labeled "Logout" to look the same as the paper items labeled "Edit Profile" and "Preferences."
Specifically, when not being hovered, I want all three to have:
paper-item {
background-color: white;
font-weight: normal;
}
Here is my code.
my-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>