Skip to content

Commit

Permalink
Use gap CSS property for multi-select input
Browse files Browse the repository at this point in the history
  • Loading branch information
ericgio committed Nov 30, 2024
1 parent fbc416b commit 6d5ed64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
3 changes: 3 additions & 0 deletions docs/Upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ The following HOCs were deprecated in a previous version and have been removed:
### Drop support for Bootstrap 4
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.

### Use `gap` CSS property in multi-select component
The use of `gap` in flexbox is [widely supported](https://caniuse.com/flexbox-gap) and much cleaner than using negative margins.

## v6.0 Breaking Changes

### `"small"` and `"large"` are no longer valid `size` values
Expand Down
9 changes: 1 addition & 8 deletions styles/Typeahead.scss
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,9 @@ $rbt-placeholder-color: #6c757d !default;
align-items: flex-start;
display: flex;
flex-wrap: wrap;
margin-bottom: -4px;
margin-top: -1px;
gap: 0.25rem;
overflow: hidden;
}

.rbt-input-main {
margin: 1px 0 4px;
}
}

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

.rbt-token-label {
padding: 0.25rem 0.5rem;
Expand Down

0 comments on commit 6d5ed64

Please sign in to comment.