Skip to content

Commit 2a24f7d

Browse files
committed
Use gap CSS property for multi-select input
1 parent e584d30 commit 2a24f7d

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
@@ -98,14 +98,9 @@ $rbt-placeholder-color: #6c757d !default;
9898
align-items: flex-start;
9999
display: flex;
100100
flex-wrap: wrap;
101-
margin-bottom: -4px;
102-
margin-top: -1px;
101+
gap: 0.25rem;
103102
overflow: hidden;
104103
}
105-
106-
.rbt-input-main {
107-
margin: 1px 0 4px;
108-
}
109104
}
110105

111106
/**
@@ -147,8 +142,6 @@ $rbt-token-active-color: $rbt-color-white !default;
147142
color: $rbt-token-color;
148143
display: inline-flex;
149144
line-height: 1rem;
150-
// TODO: Use `gap` when it's better supported
151-
margin: 1px 3px 2px 0;
152145

153146
.rbt-token-label {
154147
padding: 0.25rem 0.5rem;

0 commit comments

Comments
 (0)