Skip to content

Commit 746ea25

Browse files
committed
Consistent padding for selected-tags and input
Flexbox means we can rely on each child of the selected-options container pushing itself way from neighbors, while also wrapping to multiple lines when the width gets short! So we're removing the hard-coded heights and letting things flow as they might, with inner padding and outer margins doing the work of keeping sufficient space between things.
1 parent 34df803 commit 746ea25

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/components/Select.vue

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@
1414
attribute does most of the work for us by rearranging the child elements visually.
1515
*/
1616
.v-select[dir="rtl"] .v-select__actions {
17-
padding: 0 3px 0 6px;
17+
padding: 0 3px 0 4px;
1818
}
1919
.v-select[dir="rtl"] .dropdown-toggle .clear {
2020
margin-left: 6px;
2121
margin-right: 0;
2222
}
23-
.v-select[dir="rtl"] .selected-tag {
24-
margin-right: 3px;
25-
margin-left: 1px;
26-
}
2723
.v-select[dir="rtl"] .selected-tag .close {
2824
margin-left: 0;
2925
margin-right: 2px;
@@ -93,11 +89,12 @@
9389
flex-basis: 100%;
9490
flex-grow: 1;
9591
flex-wrap: wrap;
92+
padding: 0 2px 4px;
9693
}
9794
.v-select .v-select__actions {
9895
display: flex;
9996
align-items: center;
100-
padding: 0 6px 0 3px;
97+
padding: 0 4px 0 3px;
10198
}
10299
103100
/* Clear Button */
@@ -151,15 +148,13 @@
151148
/* Selected Tags */
152149
.v-select .selected-tag {
153150
display: flex;
154-
align-items: baseline;
151+
align-items: center;
155152
color: #333;
156153
background-color: #f0f0f0;
157154
border: 1px solid #ccc;
158155
border-radius: 4px;
159-
height: 26px;
160-
margin: 4px 1px 0px 3px;
161-
padding: 1px 0.25em;
162-
line-height: 24px;
156+
margin: 4px 2px 0px 2px;
157+
padding: 0 0.25em;
163158
}
164159
.v-select.single .selected-tag {
165160
background-color: transparent;
@@ -204,7 +199,7 @@
204199
-moz-appearance: none;
205200
line-height: 1.42857143;
206201
font-size:1em;
207-
height: 34px;
202+
height: auto;
208203
display: inline-block;
209204
border: none;
210205
outline: none;

0 commit comments

Comments
 (0)