|
| 1 | +/* |
| 2 | +Copyright 2020 Tulir Asokan <tulir@maunium.net> |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | + |
| 17 | +.mx_ReplyTile { |
| 18 | + padding-top: 2px; |
| 19 | + padding-bottom: 2px; |
| 20 | + font-size: $font-14px; |
| 21 | + position: relative; |
| 22 | + line-height: $font-16px; |
| 23 | + |
| 24 | + &.mx_ReplyTile_audio .mx_MFileBody_info_icon::before { |
| 25 | + mask-image: url("$(res)/img/element-icons/speaker.svg"); |
| 26 | + } |
| 27 | + |
| 28 | + &.mx_ReplyTile_video .mx_MFileBody_info_icon::before { |
| 29 | + mask-image: url("$(res)/img/element-icons/call/video-call.svg"); |
| 30 | + } |
| 31 | + |
| 32 | + .mx_MFileBody { |
| 33 | + .mx_MFileBody_info { |
| 34 | + margin: 5px 0; |
| 35 | + } |
| 36 | + |
| 37 | + .mx_MFileBody_download { |
| 38 | + display: none; |
| 39 | + } |
| 40 | + } |
| 41 | +} |
| 42 | + |
| 43 | +.mx_ReplyTile > a { |
| 44 | + display: flex; |
| 45 | + flex-direction: column; |
| 46 | + text-decoration: none; |
| 47 | + color: $primary-fg-color; |
| 48 | +} |
| 49 | + |
| 50 | +.mx_ReplyTile .mx_RedactedBody { |
| 51 | + padding: 4px 0 2px 20px; |
| 52 | + |
| 53 | + &::before { |
| 54 | + height: 13px; |
| 55 | + width: 13px; |
| 56 | + top: 5px; |
| 57 | + } |
| 58 | +} |
| 59 | + |
| 60 | +// We do reply size limiting with CSS to avoid duplicating the TextualBody component. |
| 61 | +.mx_ReplyTile .mx_EventTile_content { |
| 62 | + $reply-lines: 2; |
| 63 | + $line-height: $font-22px; |
| 64 | + |
| 65 | + pointer-events: none; |
| 66 | + |
| 67 | + text-overflow: ellipsis; |
| 68 | + display: -webkit-box; |
| 69 | + -webkit-box-orient: vertical; |
| 70 | + -webkit-line-clamp: $reply-lines; |
| 71 | + line-height: $line-height; |
| 72 | + |
| 73 | + .mx_EventTile_body.mx_EventTile_bigEmoji { |
| 74 | + line-height: $line-height !important; |
| 75 | + // Override the big emoji override |
| 76 | + font-size: $font-14px !important; |
| 77 | + } |
| 78 | + |
| 79 | + // Hide line numbers |
| 80 | + .mx_EventTile_lineNumbers { |
| 81 | + display: none; |
| 82 | + } |
| 83 | + |
| 84 | + // Hack to cut content in <pre> tags too |
| 85 | + .mx_EventTile_pre_container > pre { |
| 86 | + overflow: hidden; |
| 87 | + text-overflow: ellipsis; |
| 88 | + display: -webkit-box; |
| 89 | + -webkit-box-orient: vertical; |
| 90 | + -webkit-line-clamp: $reply-lines; |
| 91 | + padding: 4px; |
| 92 | + } |
| 93 | + |
| 94 | + .markdown-body blockquote, |
| 95 | + .markdown-body dl, |
| 96 | + .markdown-body ol, |
| 97 | + .markdown-body p, |
| 98 | + .markdown-body pre, |
| 99 | + .markdown-body table, |
| 100 | + .markdown-body ul { |
| 101 | + margin-bottom: 4px; |
| 102 | + } |
| 103 | +} |
| 104 | + |
| 105 | +.mx_ReplyTile.mx_ReplyTile_info { |
| 106 | + padding-top: 0; |
| 107 | +} |
| 108 | + |
| 109 | +.mx_ReplyTile .mx_SenderProfile { |
| 110 | + color: $primary-fg-color; |
| 111 | + font-size: $font-14px; |
| 112 | + display: inline-block; /* anti-zalgo, with overflow hidden */ |
| 113 | + overflow: hidden; |
| 114 | + cursor: pointer; |
| 115 | + padding-left: 0; /* left gutter */ |
| 116 | + padding-bottom: 0; |
| 117 | + padding-top: 0; |
| 118 | + margin: 0; |
| 119 | + line-height: $font-17px; |
| 120 | + /* the next three lines, along with overflow hidden, truncate long display names */ |
| 121 | + white-space: nowrap; |
| 122 | + text-overflow: ellipsis; |
| 123 | +} |
0 commit comments