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

Commit

Permalink
Use -webkit-line-clamp for the room header topic overflow (#8367)
Browse files Browse the repository at this point in the history
  • Loading branch information
luixxiul authored Apr 20, 2022
1 parent 70cdd57 commit 2fcf787
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions res/css/views/rooms/_RoomHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,24 @@ limitations under the License.
}

.mx_RoomHeader_topic {
$lineHeight: $font-16px;
$lines: 2;

flex: 1;
color: $roomtopic-color;
font-weight: 400;
font-size: $font-13px;
line-height: $lineHeight;
max-height: calc($lineHeight * $lines);
border-bottom: 1px solid transparent;

// to align baseline of topic with room name
margin: 4px 7px 0;

overflow: hidden;
text-overflow: ellipsis;
border-bottom: 1px solid transparent;
line-height: 1.2em;
max-height: 2.4em;
-webkit-line-clamp: $lines; // See: https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp
-webkit-box-orient: vertical;
display: -webkit-box;
}

.mx_RoomHeader_avatar {
Expand Down

0 comments on commit 2fcf787

Please sign in to comment.