From 1dbac57cae025a59422d5b3bf947033f7168114a Mon Sep 17 00:00:00 2001 From: timaramazanov Date: Mon, 17 Jun 2024 13:49:46 +0100 Subject: [PATCH] feat(): added ability to configure menu max-height via CSS vars --- src/components/video-button/Video-button.styles.css | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/video-button/Video-button.styles.css b/src/components/video-button/Video-button.styles.css index c8da80b..efdb5cd 100644 --- a/src/components/video-button/Video-button.styles.css +++ b/src/components/video-button/Video-button.styles.css @@ -12,6 +12,7 @@ --menu-item-color-active: $menu-item-color-active; --menu-item-background-hover: var(--primary, $menu-item-background-hover); --menu-item-color-hover: $menu-item-color-hover; + --menu-max-height: auto; --size: var(--button-size); } @@ -73,6 +74,8 @@ button { height: 0; overflow: hidden; user-select: none; + max-height: var(--menu-max-height); + overflow: auto; & .inner { padding: 6px 12px; } @@ -83,8 +86,7 @@ button { @media (max-width: 640px) { :host(:not([is-fullscreen])) .menu { - max-height: 150px; - overflow: auto; + --menu-max-height: 150px; } }