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

Commit

Permalink
Give status a max-height
Browse files Browse the repository at this point in the history
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
  • Loading branch information
SimonBrandner committed Dec 10, 2021
1 parent a8dc0e6 commit 1df5c7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion res/css/views/right_panel/_UserInfo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,19 @@ limitations under the License.
}

.mx_UserInfo_statusMessage {
$statusLineHeight: 16px;
$statusNumberOfLines: 3;

font-size: $font-11px;
line-height: $statusLineHeight;
opacity: 0.5;
overflow: hidden;
text-overflow: clip;
word-break: break-word;
text-overflow: ellipsis;
display: -webkit-box;
max-height: calc($statusLineHeight * $statusNumberOfLines);
-webkit-line-clamp: $statusNumberOfLines;
-webkit-box-orient: vertical;
}

.mx_AutoHideScrollbar {
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/right_panel/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ const UserInfoHeader: React.FC<{

let statusLabel = null;
if (statusMessage) {
statusLabel = <span className="mx_UserInfo_statusMessage">{ statusMessage }</span>;
statusLabel = <div className="mx_UserInfo_statusMessage">{ statusMessage }</div>;
}

let e2eIcon;
Expand Down

0 comments on commit 1df5c7c

Please sign in to comment.