web-components icon indicating copy to clipboard operation
web-components copied to clipboard

[list-box] Refactor API for configuring item checkmark

Open web-padawan opened this issue 5 years ago • 2 comments

  1. in vaadin-item we have this code:
:host([tabindex])::before {
  display: var(--_lumo-item-selected-icon-display, none);
  content: var(--lumo-icons-checkmark);
}
  1. In vaadin-list-box we use it like this
:host {
  --_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
}
  1. In vaadin-context-menu, we override it like this:
:host {
  --_lumo-list-box-item-selected-icon-display: none;
}
  1. However, in context-menu with nested menus, we reset it like this:
:host(.vaadin-menu-list-box) {
  --_lumo-list-box-item-selected-icon-display: block;
}

In future major releases, we need to come up with a better API.

web-padawan avatar Apr 03 '20 13:04 web-padawan