From ded01cfd8a2ad334d647cc13c0126f42eae05aad Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 28 Sep 2021 08:22:26 -0400 Subject: [PATCH] fixes #544 --- docs/resources/changelog.md | 1 + src/components/select/select.styles.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index 9f523c6d..aacc91f1 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -15,6 +15,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis - Added the `filled` variation to ``, ``, and `` and supporting design tokens - Added the `control` part to `` so you can target the main control with CSS [#538](https://github.com/shoelace-style/shoelace/issues/538) - Changed the default `distance` in `` from `2` to `0` [#538](https://github.com/shoelace-style/shoelace/issues/538) +- Fixed a bug where `` would be larger than the viewport when it had lots of options [#544](https://github.com/shoelace-style/shoelace/issues/544) ## 2.0.0-beta.52 diff --git a/src/components/select/select.styles.ts b/src/components/select/select.styles.ts index 52273c62..75b7ebf1 100644 --- a/src/components/select/select.styles.ts +++ b/src/components/select/select.styles.ts @@ -29,6 +29,11 @@ export default css` cursor: pointer; } + .select__menu { + max-height: 50vh; + overflow: auto; + } + /* Standard selects */ .select--standard .select__control { background-color: rgb(var(--sl-input-background-color));