Skip to content

Commit

Permalink
use text-truncate instead of styles
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Jun 15, 2023
1 parent 8220acb commit 511166c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -2054,15 +2054,14 @@ class Tags {
classes.push(...this._config.baseClass.split(" "));
} else if (v5) {
// https://getbootstrap.com/docs/5.3/components/badge/
classes = [...classes, ...["bg-" + badgeStyle]];
classes = [...classes, ...["bg-" + badgeStyle], "text-truncate"];
} else {
// https://getbootstrap.com/docs/4.6/components/badge/
classes = [...classes, ...["badge-" + badgeStyle]];
}

// add extra styles to avoid any layout issues due to very large labels
span.style.maxWidth = "100%";
span.style.overflowX = "hidden";
}

if (data.disabled) {
Expand Down

0 comments on commit 511166c

Please sign in to comment.