Skip to content

Commit 6d5ed64

Browse files
committed
Use gap CSS property for multi-select input
1 parent fbc416b commit 6d5ed64

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

docs/Upgrading.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ The following HOCs were deprecated in a previous version and have been removed:
2020
### Drop support for Bootstrap 4
2121
Bootstrap 5 is now over 3 years old. BS4 should still mostly work, but you may need to add some custom CSS in a few cases.
2222

23+
### Use `gap` CSS property in multi-select component
24+
The use of `gap` in flexbox is [widely supported](https://caniuse.com/flexbox-gap) and much cleaner than using negative margins.
25+
2326
## v6.0 Breaking Changes
2427

2528
### `"small"` and `"large"` are no longer valid `size` values

styles/Typeahead.scss

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,9 @@ $rbt-placeholder-color: #6c757d !default;
100100
align-items: flex-start;
101101
display: flex;
102102
flex-wrap: wrap;
103-
margin-bottom: -4px;
104-
margin-top: -1px;
103+
gap: 0.25rem;
105104
overflow: hidden;
106105
}
107-
108-
.rbt-input-main {
109-
margin: 1px 0 4px;
110-
}
111106
}
112107

113108
/**
@@ -149,8 +144,6 @@ $rbt-token-active-color: $rbt-color-white !default;
149144
color: $rbt-token-color;
150145
display: inline-flex;
151146
line-height: 1rem;
152-
// TODO: Use `gap` when it's better supported
153-
margin: 1px 3px 2px 0;
154147

155148
.rbt-token-label {
156149
padding: 0.25rem 0.5rem;

0 commit comments

Comments
 (0)