Skip to content

Commit

Permalink
fix: select: ensure medium and large pills fit inside inputs of same …
Browse files Browse the repository at this point in the history
…size
  • Loading branch information
dkilgore-eightfold committed Jun 2, 2023
1 parent 78a333d commit b1f0f4f
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions src/components/Select/select.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$input-padding-horizontal: 8px;
$input-padding-horizontal: $space-xs;
$multi-select-count-offset: 54px;

// Export values for typescript consumption.
Expand Down Expand Up @@ -63,6 +63,7 @@ $multi-select-count-offset: 54px;
text-align: center;
display: flex;
justify-content: center;
padding: 3px $space-xs;
pointer-events: all;

span {
Expand All @@ -73,6 +74,7 @@ $multi-select-count-offset: 54px;

.multi-select-count {
margin-right: $space-xs;
padding: 3px $space-xs;
}

.selected-option {
Expand All @@ -83,17 +85,22 @@ $multi-select-count-offset: 54px;
&.select-large {
.multi-select-pills {
top: 7px;

.multi-select-count,
.multi-select-pill {
padding: 3px $space-xs;
}
}

.select-clear-button {
bottom: 0;
height: 44px;
padding: 4px 8px;
width: 32px;
padding: $space-xxs $space-xs;
width: $space-xl;
}

.select-clear-button-start {
left: 2px;
left: $space-xxxs;
right: unset;
}

Expand All @@ -106,17 +113,22 @@ $multi-select-count-offset: 54px;
&.select-medium {
.multi-select-pills {
top: 5px;

.multi-select-count,
.multi-select-pill {
padding: 3px $space-xs;
}
}

.select-clear-button {
bottom: 4px;
bottom: $space-xxs;
height: 28px;
padding: 4px 6px;
padding: $space-xxs 6px;
width: 28px;
}

.select-clear-button-start {
left: 2px;
left: $space-xxxs;
right: unset;
}

Expand All @@ -128,23 +140,23 @@ $multi-select-count-offset: 54px;

&.select-small {
.multi-select-pills {
top: 4px;
top: $space-xxs;

.multi-select-count,
.multi-select-pill {
padding: 2px 12px;
padding: $space-xxxs $space-s;
}
}

.select-clear-button {
bottom: 2px;
height: 24px;
padding: 2px 4px;
width: 24px;
bottom: $space-xxxs;
height: $space-l;
padding: $space-xxxs $space-xxs;
width: $space-l;
}

.select-clear-button-start {
left: 2px;
left: $space-xxxs;
right: unset;
}

Expand Down

0 comments on commit b1f0f4f

Please sign in to comment.