Skip to content

Commit

Permalink
fix(cosmoz-dropdown-menu): limit list height to 96vh-64px
Browse files Browse the repository at this point in the history
Limit the height of the list to 96vh - 64px.
Allow changing the max height per in instace with css vars.
  • Loading branch information
megheaiulian committed Apr 28, 2022
1 parent 5942b3a commit 29e4b03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cosmoz-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ const preventDefault = e => e.preventDefault(),
},
List = () => html`
<style>
:host { display: contents; }
:host {
display: contents;
max-height: var(--cosmoz-dropdown-menu-max-height, calc(96vh - 64px));
overflow-y: auto;
}
::slotted(:not(slot)) {
display: block;
--paper-button_-_display: block;
Expand Down

0 comments on commit 29e4b03

Please # to comment.