From 6ce6e2246641a051009b23f060ad161293c5adbc Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Wed, 18 Sep 2024 09:46:46 -0400 Subject: [PATCH] fix select prefix spacing; closes #2167 (#2174) --- docs/pages/resources/changelog.md | 1 + src/components/select/select.styles.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/pages/resources/changelog.md b/docs/pages/resources/changelog.md index 797742fa..aa864124 100644 --- a/docs/pages/resources/changelog.md +++ b/docs/pages/resources/changelog.md @@ -19,6 +19,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti - Fixed a bug that caused errors to show in the console when components disconnect before before `firstUpdated()` executes [#2127] - Fixed a bug that made pagination work incorrectly in `` [#2155] - Fixed a bug in `` that caused the active tab indicator to be the wrong size when the tab's content changes [#2164] +- Fixed a bug in `` that caused the prefix icon to have incorrect spacing [#2167] ## 2.16.0 diff --git a/src/components/select/select.styles.ts b/src/components/select/select.styles.ts index 7b5f4e44..ddc3d3d4 100644 --- a/src/components/select/select.styles.ts +++ b/src/components/select/select.styles.ts @@ -176,6 +176,10 @@ export default css` margin-inline-end: var(--sl-input-spacing-small); } + .select--small.select--multiple .select__prefix::slotted(*) { + margin-inline-start: var(--sl-input-spacing-small); + } + .select--small.select--multiple:not(.select--placeholder-visible) .select__combobox { padding-block: 2px; padding-inline-start: 0; @@ -201,6 +205,10 @@ export default css` margin-inline-end: var(--sl-input-spacing-medium); } + .select--medium.select--multiple .select__prefix::slotted(*) { + margin-inline-start: var(--sl-input-spacing-medium); + } + .select--medium.select--multiple:not(.select--placeholder-visible) .select__combobox { padding-inline-start: 0; padding-block: 3px; @@ -226,6 +234,10 @@ export default css` margin-inline-end: var(--sl-input-spacing-large); } + .select--large.select--multiple .select__prefix::slotted(*) { + margin-inline-start: var(--sl-input-spacing-large); + } + .select--large.select--multiple:not(.select--placeholder-visible) .select__combobox { padding-inline-start: 0; padding-block: 4px;