Skip to content

[list-box] Refactor API for configuring item checkmark #613

@web-padawan

Description

@web-padawan
  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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions