From a6d4cea3b71dfdc34a92cc7822d8343edaa80e86 Mon Sep 17 00:00:00 2001 From: Christian Schilling Date: Mon, 23 Sep 2024 17:34:33 +0200 Subject: [PATCH] Fix for #2145 (#2146) * Fix for #2145 * Fixed misleading comment after css adjustments * Use same spacing for all sizes --------- Co-authored-by: Cory LaViska --- docs/pages/resources/changelog.md | 5 +++++ src/components/select/select.styles.ts | 13 +++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/pages/resources/changelog.md b/docs/pages/resources/changelog.md index 142de763..cabc226c 100644 --- a/docs/pages/resources/changelog.md +++ b/docs/pages/resources/changelog.md @@ -12,6 +12,11 @@ Components with the Experimental bad New versions of Shoelace are released as-needed and generally occur when a critical mass of changes have accumulated. At any time, you can see what's coming in the next release by visiting [next.shoelace.style](https://next.shoelace.style). +## Next + +- Fixed a bug in `` that made the suffix slot collide with the clear button [#2145] + + ## 2.17.0 - Added the `fixed-scroll-controls` attribute to `` [#2128] diff --git a/src/components/select/select.styles.ts b/src/components/select/select.styles.ts index ddc3d3d4..16d1a12c 100644 --- a/src/components/select/select.styles.ts +++ b/src/components/select/select.styles.ts @@ -260,20 +260,17 @@ export default css` border-radius: var(--sl-input-height-large); } - /* Prefix */ - .select__prefix { + /* Prefix and Suffix */ + .select__prefix, + .select__suffix { flex: 0; display: inline-flex; align-items: center; color: var(--sl-input-placeholder-color); } - /* Suffix */ - .select__suffix { - flex: 0; - display: inline-flex; - align-items: center; - color: var(--sl-input-placeholder-color); + .select__suffix::slotted(*) { + margin-inline-start: var(--sl-spacing-small); } /* Clear button */