Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.

Commit d727d44

Browse files
authored
Tree Item: Prevent prefix icon from shrinking (#686)
Wraps the prefix icon slot in a flex container, to prevent slotted SVGs from shrinking at narrow widths
1 parent a127d2a commit d727d44

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@crowdstrike/glide-core': patch
3+
---
4+
5+
SVGs placed in the `prefix` slot of a Tree Item will no longer shrink at narrow widths.

src/tree.item.styles.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ export default [
5656
}
5757
}
5858
59+
.prefix-slot {
60+
align-items: center;
61+
display: flex;
62+
}
63+
5964
.label-and-children {
6065
display: flex;
6166
flex-direction: column;

src/tree.item.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ export default class GlideCoreTreeItem extends LitElement {
122122
123123
<slot
124124
name="prefix"
125+
class="prefix-slot"
125126
${ref(this.#prefixSlotElementRef)}
126127
@slotchange=${this.#onPrefixSlotChange}
127128
></slot>

0 commit comments

Comments
 (0)