2021-05-28 15:32:55 +05:30
|
|
|
/*
|
|
|
|
Copyright 2020 Bruno Windels <bruno@windels.cloud>
|
|
|
|
Copyright 2020 The Matrix.org Foundation C.I.C.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2021-09-15 22:00:08 +05:30
|
|
|
.Timeline_jumpDown {
|
|
|
|
width: 40px;
|
|
|
|
height: 40px;
|
|
|
|
bottom: 16px;
|
|
|
|
right: 32px;
|
|
|
|
border-radius: 100%;
|
|
|
|
border: 1px solid #8d99a5;
|
2021-09-16 20:04:01 +05:30
|
|
|
background-image: url("./icons/chevron-down.svg");
|
2021-09-15 22:00:08 +05:30
|
|
|
background-position: center;
|
|
|
|
background-color: white;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
2021-05-28 15:32:55 +05:30
|
|
|
.Timeline_message {
|
|
|
|
display: grid;
|
|
|
|
grid-template:
|
|
|
|
"avatar sender" auto
|
|
|
|
"avatar body" auto
|
2021-06-03 22:46:19 +05:30
|
|
|
"time body" 1fr
|
|
|
|
"time reactions" auto /
|
2021-05-28 15:32:55 +05:30
|
|
|
30px 1fr;
|
|
|
|
column-gap: 8px;
|
|
|
|
padding: 4px;
|
|
|
|
margin: 0 12px;
|
|
|
|
/* TODO: check whether this is needed for .media to maintain aspect ratio (on IE11) like the 100% above */
|
|
|
|
/* width: 100%; */
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_message:not(.continuation) {
|
|
|
|
margin-top: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 800px) {
|
|
|
|
.Timeline_message {
|
|
|
|
grid-template:
|
2021-06-03 22:46:19 +05:30
|
|
|
"avatar sender" auto
|
|
|
|
"body body" 1fr
|
|
|
|
"time time" auto
|
|
|
|
"reactions reactions" auto /
|
2021-05-28 15:32:55 +05:30
|
|
|
30px 1fr;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageSender {
|
|
|
|
margin-top: 0 !important;
|
|
|
|
align-self: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-23 02:37:13 +05:30
|
|
|
.Timeline_message:hover:not(.disabled), .Timeline_message.selected, .Timeline_message.menuOpen {
|
2021-05-28 15:32:55 +05:30
|
|
|
background-color: rgba(141, 151, 165, 0.1);
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
|
2021-05-28 16:44:55 +05:30
|
|
|
.Timeline_message:hover > .Timeline_messageOptions,
|
|
|
|
.Timeline_message.menuOpen > .Timeline_messageOptions {
|
2021-05-28 15:32:55 +05:30
|
|
|
display: block;
|
2021-06-23 21:18:21 +05:30
|
|
|
user-select: none;
|
2021-05-28 15:32:55 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageAvatar {
|
|
|
|
grid-area: avatar;
|
2021-08-06 21:07:30 +05:30
|
|
|
text-decoration: none;
|
2021-05-28 15:32:55 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageSender {
|
|
|
|
grid-area: sender;
|
|
|
|
font-weight: bold;
|
|
|
|
line-height: 1.7rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageSender, .Timeline_messageBody {
|
|
|
|
/* reset body margin */
|
|
|
|
margin: 0;
|
2021-09-24 22:12:44 +05:30
|
|
|
/* first try break-all, then break-word, which isn't supported everywhere */
|
|
|
|
word-break: break-all;
|
|
|
|
word-break: break-word;
|
2021-05-28 15:32:55 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_message:not(.continuation) .Timeline_messageSender,
|
|
|
|
.Timeline_message:not(.continuation) .Timeline_messageBody {
|
|
|
|
margin-top: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageOptions {
|
|
|
|
display: none;
|
|
|
|
grid-area: body;
|
|
|
|
align-self: start;
|
2021-05-31 16:32:42 +05:30
|
|
|
justify-self: end;
|
2021-05-28 15:32:55 +05:30
|
|
|
margin-top: -12px;
|
|
|
|
margin-right: 4px;
|
2021-05-28 15:52:47 +05:30
|
|
|
/* button visuals */
|
|
|
|
border: #ccc 1px solid;
|
|
|
|
height: 24px;
|
2021-05-31 16:32:42 +05:30
|
|
|
width: 24px;
|
2021-05-28 15:52:47 +05:30
|
|
|
background-color: #fff;
|
|
|
|
border-radius: 4px;
|
2021-05-31 16:33:23 +05:30
|
|
|
padding: 0;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 22px;
|
|
|
|
cursor: pointer;
|
2021-05-28 15:32:55 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageTime {
|
|
|
|
grid-area: time;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody time {
|
|
|
|
padding: 2px 0 0px 10px;
|
2021-06-23 21:18:21 +05:30
|
|
|
user-select: none;
|
2021-05-28 15:32:55 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody time, .Timeline_messageTime {
|
|
|
|
font-size: 0.8em;
|
|
|
|
line-height: normal;
|
|
|
|
color: #aaa;
|
|
|
|
}
|
|
|
|
|
2021-05-28 15:47:59 +05:30
|
|
|
.Timeline_messageBody.statusMessage {
|
|
|
|
font-style: italic;
|
|
|
|
color: #777;
|
|
|
|
}
|
|
|
|
|
2021-05-28 15:32:55 +05:30
|
|
|
.Timeline_messageBody {
|
|
|
|
grid-area: body;
|
|
|
|
line-height: 2.2rem;
|
|
|
|
/* so the .media can grow horizontally and its spacer can grow vertically */
|
|
|
|
width: 100%;
|
2021-07-16 23:30:54 +05:30
|
|
|
/* Fix for pre overflow */
|
|
|
|
min-width: 0;
|
2021-05-28 15:32:55 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.hydrogen .Timeline_messageSender.usercolor1 { color: var(--usercolor1); }
|
|
|
|
.hydrogen .Timeline_messageSender.usercolor2 { color: var(--usercolor2); }
|
|
|
|
.hydrogen .Timeline_messageSender.usercolor3 { color: var(--usercolor3); }
|
|
|
|
.hydrogen .Timeline_messageSender.usercolor4 { color: var(--usercolor4); }
|
|
|
|
.hydrogen .Timeline_messageSender.usercolor5 { color: var(--usercolor5); }
|
|
|
|
.hydrogen .Timeline_messageSender.usercolor6 { color: var(--usercolor6); }
|
|
|
|
.hydrogen .Timeline_messageSender.usercolor7 { color: var(--usercolor7); }
|
|
|
|
.hydrogen .Timeline_messageSender.usercolor8 { color: var(--usercolor8); }
|
|
|
|
|
2021-07-16 20:57:24 +05:30
|
|
|
.Timeline_messageBody h1,
|
|
|
|
.Timeline_messageBody h2,
|
|
|
|
.Timeline_messageBody h3,
|
|
|
|
.Timeline_messageBody h4,
|
|
|
|
.Timeline_messageBody h5,
|
|
|
|
.Timeline_messageBody h6 {
|
2021-07-16 20:23:33 +05:30
|
|
|
font-weight: bold;
|
|
|
|
margin: 0.7em 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody h1 { font-size: 1.6em; }
|
|
|
|
.Timeline_messageBody h2 { font-size: 1.5em; }
|
|
|
|
.Timeline_messageBody h3 { font-size: 1.4em; }
|
|
|
|
.Timeline_messageBody h4 { font-size: 1.3em; }
|
|
|
|
.Timeline_messageBody h5 { font-size: 1.2em; }
|
|
|
|
.Timeline_messageBody h6 { font-size: 1.1em; }
|
|
|
|
|
2021-06-23 21:18:21 +05:30
|
|
|
.Timeline_messageBody a {
|
|
|
|
word-break: break-all;
|
|
|
|
}
|
2021-05-28 15:32:55 +05:30
|
|
|
|
2021-07-16 19:57:43 +05:30
|
|
|
.Timeline_messageBody a.link {
|
|
|
|
color: #238cf5;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
2021-05-28 15:32:55 +05:30
|
|
|
.Timeline_messageBody .media {
|
|
|
|
display: grid;
|
|
|
|
margin-top: 4px;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody .media > a {
|
|
|
|
text-decoration: none;
|
|
|
|
width: 100%;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* .spacer grows with an inline padding-top to the size of the image,
|
|
|
|
so the timeline doesn't jump when the image loads */
|
|
|
|
.Timeline_messageBody .media > * {
|
|
|
|
grid-row: 1;
|
|
|
|
grid-column: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody .media img, .Timeline_messageBody .media video {
|
|
|
|
width: 100%;
|
|
|
|
height: auto;
|
|
|
|
/* for IE11 to still scale even though the spacer is too tall */
|
|
|
|
align-self: start;
|
|
|
|
border-radius: 4px;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
/* stretch the image (to the spacer) on platforms
|
|
|
|
where we can trust the spacer to always have the correct height,
|
|
|
|
otherwise the image starts with height 0 and with loading=lazy
|
|
|
|
only loads when the top comes into view*/
|
|
|
|
.hydrogen:not(.legacy) .Timeline_messageBody .media img,
|
|
|
|
.hydrogen:not(.legacy) .Timeline_messageBody .media video {
|
|
|
|
align-self: stretch;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody .media > .sendStatus {
|
|
|
|
align-self: end;
|
|
|
|
justify-self: start;
|
|
|
|
font-size: 0.8em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody .media > progress {
|
|
|
|
align-self: center;
|
|
|
|
justify-self: center;
|
|
|
|
width: 75%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody .media > time {
|
|
|
|
align-self: end;
|
|
|
|
justify-self: end;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody .media > time,
|
|
|
|
.Timeline_messageBody .media > .sendStatus {
|
|
|
|
color: #2e2f32;
|
|
|
|
display: block;
|
|
|
|
padding: 2px;
|
|
|
|
margin: 4px;
|
|
|
|
background-color: rgba(255, 255, 255, 0.75);
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
.Timeline_messageBody .media > .spacer {
|
|
|
|
/* TODO: can we implement this with a pseudo element? or perhaps they are not grid items? */
|
|
|
|
width: 100%;
|
|
|
|
/* don't stretch height as it is a spacer, just in case it doesn't match with image height */
|
|
|
|
align-self: start;
|
|
|
|
}
|
2021-07-16 19:58:03 +05:30
|
|
|
.Timeline_messageBody code, .Timeline_messageBody pre {
|
|
|
|
background-color: #f8f8f8;
|
|
|
|
font-family: monospace;
|
2021-07-17 03:02:38 +05:30
|
|
|
font-size: 0.9em;
|
2021-07-16 19:58:03 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody code {
|
|
|
|
border-radius: 3px;
|
|
|
|
padding: .2em .3em;
|
|
|
|
margin: 0;
|
|
|
|
}
|
2021-05-28 15:32:55 +05:30
|
|
|
|
2021-07-08 01:35:24 +05:30
|
|
|
.Timeline_messageBody pre {
|
|
|
|
border: 1px solid rgb(229, 229, 229);
|
2021-07-16 22:46:15 +05:30
|
|
|
padding: 0.5em;
|
|
|
|
max-height: 30em;
|
|
|
|
overflow: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody pre > code {
|
|
|
|
background-color: unset;
|
|
|
|
border-radius: unset;
|
|
|
|
display: block;
|
2021-07-17 03:02:38 +05:30
|
|
|
font-size: unset;
|
2021-07-08 01:35:24 +05:30
|
|
|
}
|
|
|
|
|
2021-07-15 06:41:09 +05:30
|
|
|
.Timeline_messageBody blockquote {
|
|
|
|
margin-left: 0;
|
|
|
|
padding-left: 20px;
|
|
|
|
border-left: 4px solid rgb(229, 229, 229);
|
|
|
|
}
|
|
|
|
|
2021-07-15 10:59:37 +05:30
|
|
|
.Timeline_messageBody table {
|
|
|
|
border: 1px solid rgb(206, 206, 206);
|
|
|
|
border-radius: 2px;
|
|
|
|
border-spacing: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody thead th {
|
|
|
|
border-bottom: 1px solid rgb(206, 206, 206);
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody td, .Timeline_messageBody th {
|
|
|
|
padding: 2px 5px 2px 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody tbody tr:nth-child(2n) {
|
|
|
|
background-color: #f6f6f6;
|
|
|
|
}
|
|
|
|
|
2021-07-15 06:27:53 +05:30
|
|
|
.Timeline_messageBody .pill {
|
2021-07-16 19:57:22 +05:30
|
|
|
padding: 0px 5px;
|
2021-07-15 06:27:53 +05:30
|
|
|
border-radius: 15px;
|
|
|
|
background-color: #f6f6f6;
|
|
|
|
border: 1px solid rgb(206, 206, 206);
|
|
|
|
text-decoration: none;
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
2021-07-16 19:57:22 +05:30
|
|
|
line-height: 2rem;
|
|
|
|
vertical-align: top;
|
|
|
|
margin: 1px;
|
2021-07-15 06:27:53 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageBody .pill div.avatar {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 3px;
|
|
|
|
}
|
|
|
|
|
2021-05-28 18:57:25 +05:30
|
|
|
.Timeline_message.unsent .Timeline_messageBody {
|
2021-05-28 15:32:55 +05:30
|
|
|
color: #ccc;
|
|
|
|
}
|
|
|
|
|
2021-05-28 18:57:25 +05:30
|
|
|
.Timeline_message.unverified .Timeline_messageBody {
|
2021-05-28 15:32:55 +05:30
|
|
|
color: #ff4b55;
|
|
|
|
}
|
|
|
|
|
2021-06-03 22:46:19 +05:30
|
|
|
.Timeline_messageReactions {
|
|
|
|
grid-area: reactions;
|
2021-06-04 00:31:59 +05:30
|
|
|
margin-top: 6px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.Timeline_messageReactions button {
|
|
|
|
display: inline-flex;
|
|
|
|
line-height: 2.0rem;
|
|
|
|
margin-right: 6px;
|
|
|
|
padding: 1px 6px;
|
|
|
|
border: 1px solid #e9edf1;
|
|
|
|
border-radius: 10px;
|
|
|
|
background-color: #f3f8fd;
|
|
|
|
cursor: pointer;
|
|
|
|
user-select: none;
|
|
|
|
vertical-align: middle;
|
2021-06-03 22:46:19 +05:30
|
|
|
}
|
|
|
|
|
2021-06-23 21:18:21 +05:30
|
|
|
.Timeline_messageReactions button.active {
|
2021-06-04 00:31:59 +05:30
|
|
|
background-color: #e9fff9;
|
|
|
|
border-color: #0DBD8B;
|
2021-06-03 23:27:16 +05:30
|
|
|
}
|
|
|
|
|
2021-06-04 20:02:35 +05:30
|
|
|
@keyframes glow-reaction-border {
|
|
|
|
0% { border-color: #e9edf1; }
|
|
|
|
100% { border-color: #0DBD8B; }
|
|
|
|
}
|
|
|
|
|
2021-06-23 21:18:21 +05:30
|
|
|
.Timeline_messageReactions button.active.pending {
|
2021-06-04 20:02:35 +05:30
|
|
|
animation-name: glow-reaction-border;
|
2021-06-10 21:59:10 +05:30
|
|
|
animation-duration: 0.5s;
|
2021-06-04 20:02:35 +05:30
|
|
|
animation-direction: alternate;
|
|
|
|
animation-iteration-count: infinite;
|
|
|
|
animation-timing-function: linear;
|
|
|
|
}
|
|
|
|
|
2021-05-28 15:32:55 +05:30
|
|
|
.AnnouncementView {
|
|
|
|
margin: 5px 0;
|
|
|
|
padding: 5px 10%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.AnnouncementView > div {
|
|
|
|
margin: 0 auto;
|
|
|
|
padding: 10px 20px;
|
|
|
|
background-color: rgba(245, 245, 245, 0.90);
|
|
|
|
text-align: center;
|
|
|
|
border-radius: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.GapView > :not(:first-child) {
|
|
|
|
margin-left: 12px;
|
|
|
|
}
|
2021-09-15 19:27:31 +05:30
|
|
|
|
|
|
|
.GapView {
|
|
|
|
padding: 52px 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.GapView.isAtTop {
|
|
|
|
padding: 52px 20px 12px 20px;
|
|
|
|
}
|