-
-
Notifications
You must be signed in to change notification settings - Fork 834
Use -webkit-line-clamp for the room header topic overflow #8367
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,17 +141,25 @@ limitations under the License. | |
} | ||
|
||
.mx_RoomHeader_topic { | ||
$line-height: 1.2em; | ||
$lines: 2; | ||
|
||
flex: 1; | ||
color: $roomtopic-color; | ||
font-weight: 400; | ||
font-size: $font-13px; | ||
border-bottom: 1px solid transparent; | ||
line-height: $line-height; | ||
max-height: calc($line-height * $lines); | ||
|
||
// 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; | ||
line-clamp: $lines; // https://drafts.csswg.org/css-overflow-3/#line-clamp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think since this is still in draft status, we should only use the prefixed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It says:
But since this is the draft, the documentation is not finalized or standardized, so the fact is that Anyway |
||
display: -webkit-box; | ||
-webkit-line-clamp: $lines; | ||
-webkit-box-orient: vertical; | ||
} | ||
|
||
.mx_RoomHeader_avatar { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a
$font-
variable here. Also, according to the upcoming style guide, this variable should be camelCase since it's not shared.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've forgot the line-height is a property of font style- will address soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note:
1.2em
has been converted to 15.6px, so this needs a small adjustment instead of changing this to$font-12px
, which is 1.2rem.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was replaced with $font-16px. Although there is 0.4px difference (16 - 15.6), it should be fine.