Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Clamp reaction content width to at most 100px
Browse files Browse the repository at this point in the history
  • Loading branch information
jryans committed Jul 5, 2019
1 parent 2a8f9a8 commit eb0e1ea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 9 additions & 1 deletion res/css/views/messages/_ReactionsRowButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

.mx_ReactionsRowButton {
display: inline-block;
display: inline-flex;
height: 20px;
line-height: 21px;
margin-right: 6px;
Expand All @@ -35,3 +35,11 @@ limitations under the License.
border-color: $reaction-row-button-selected-border-color;
}
}

.mx_ReactionsRowButton_content {
max-width: 100px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-right: 4px;
}
7 changes: 6 additions & 1 deletion src/components/views/messages/ReactionsRowButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ export default class ReactionsRowButton extends React.PureComponent {
onMouseOver={this.onMouseOver}
onMouseOut={this.onMouseOut}
>
{content} {count}
<span className="mx_ReactionsRowButton_content">
{content}
</span>
<span className="mx_ReactionsRowButton_count">
{count}
</span>
{tooltip}
</span>;
}
Expand Down

0 comments on commit eb0e1ea

Please sign in to comment.