2019-07-31 20:37:06 +02:00
|
|
|
.rendered_markdown {
|
|
|
|
/* The default top/bottom margins for paragraphs are small, to make sure
|
|
|
|
they look nice next to blockquotes, lists, etc. */
|
2023-03-17 22:10:10 +01:00
|
|
|
& p {
|
2021-11-05 03:33:16 +01:00
|
|
|
margin: 3px 0;
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* The spacing between two paragraphs is significantly larger. We
|
|
|
|
arrange things so that this spacing matches the spacing between
|
|
|
|
paragraphs in two consecutive 1-line messages. */
|
2023-03-17 22:10:10 +01:00
|
|
|
& p + p {
|
2019-07-31 20:37:06 +02:00
|
|
|
margin-top: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Ensure bulleted lists are nicely centered in 1-line messages */
|
2023-03-17 22:10:10 +01:00
|
|
|
& ul {
|
2019-07-31 20:37:06 +02:00
|
|
|
margin: 2px 0 5px 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Swap the left and right margins of bullets for Right-To-Left languages */
|
|
|
|
&.rtl ul {
|
|
|
|
margin-right: 20px;
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Ensure ordered lists are nicely centered in 1-line messages */
|
2023-03-17 22:10:10 +01:00
|
|
|
& ol {
|
2019-08-11 07:41:34 +02:00
|
|
|
margin: 2px 0 5px 20px;
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Swap the left and right margins of ordered list for Right-To-Left languages */
|
|
|
|
&.rtl ol {
|
|
|
|
margin-right: 8px;
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Reduce top-margin when a paragraph is followed by an ordered or bulleted list */
|
2023-03-17 22:10:10 +01:00
|
|
|
& p + ul,
|
2019-07-31 20:37:06 +02:00
|
|
|
p + ol {
|
2021-02-12 15:44:36 +01:00
|
|
|
margin-top: 0;
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& hr {
|
2023-03-20 22:08:47 +01:00
|
|
|
border-bottom: 1px solid hsl(0deg 0% 87%);
|
|
|
|
border-top: 1px solid hsl(0deg 0% 87%);
|
2021-07-21 21:31:48 +02:00
|
|
|
}
|
|
|
|
|
2021-07-25 21:35:01 +02:00
|
|
|
/* Headings */
|
2023-03-17 22:10:10 +01:00
|
|
|
& h1,
|
2019-07-31 08:04:32 +02:00
|
|
|
h2,
|
|
|
|
h3,
|
|
|
|
h4,
|
|
|
|
h5,
|
|
|
|
h6 {
|
|
|
|
font-weight: 600;
|
|
|
|
line-height: 1.4;
|
2021-09-15 00:00:30 +02:00
|
|
|
margin-top: 15px;
|
2019-07-31 08:04:32 +02:00
|
|
|
margin-bottom: 5px;
|
2021-07-25 21:35:01 +02:00
|
|
|
}
|
|
|
|
|
2021-09-15 00:00:30 +02:00
|
|
|
/* Headings: Ensure that messages that start with a heading don't have
|
|
|
|
a weirdly blank area at the very start of the message. */
|
2023-03-17 22:10:10 +01:00
|
|
|
& h1:first-child,
|
2021-09-15 00:00:30 +02:00
|
|
|
h2:first-child,
|
|
|
|
h3:first-child,
|
|
|
|
h4:first-child,
|
|
|
|
h5:first-child,
|
|
|
|
h6:first-child {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
2021-07-25 21:35:01 +02:00
|
|
|
/* We use a modest progression of heading sizes to make them stand out
|
|
|
|
from normal next but avoid taking up too much space. */
|
2023-03-17 22:10:10 +01:00
|
|
|
& h1 {
|
2021-07-25 21:35:01 +02:00
|
|
|
font-size: 1.4em;
|
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& h2 {
|
2021-07-25 21:35:01 +02:00
|
|
|
font-size: 1.3em;
|
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& h3 {
|
2021-07-25 21:35:01 +02:00
|
|
|
font-size: 1.2em;
|
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& h4 {
|
2021-07-25 21:35:01 +02:00
|
|
|
font-size: 1.1em;
|
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& h5 {
|
2021-09-15 00:00:30 +02:00
|
|
|
font-size: 1.05em;
|
2021-07-25 21:35:01 +02:00
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& h6 {
|
2021-07-25 21:35:01 +02:00
|
|
|
font-size: 1em;
|
2019-07-31 08:04:32 +02:00
|
|
|
}
|
|
|
|
|
2019-07-31 20:37:06 +02:00
|
|
|
/* Formatting for blockquotes */
|
2023-03-17 22:10:10 +01:00
|
|
|
& blockquote {
|
2019-07-31 20:37:06 +02:00
|
|
|
padding-left: 5px;
|
|
|
|
margin-left: 10px;
|
|
|
|
margin-top: 5px;
|
|
|
|
margin-bottom: 6px;
|
2023-03-20 22:08:47 +01:00
|
|
|
border-left-color: hsl(0deg 0% 87%);
|
2019-07-31 20:37:06 +02:00
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& p {
|
2019-07-31 20:37:06 +02:00
|
|
|
line-height: inherit;
|
|
|
|
font-size: inherit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.rtl blockquote {
|
|
|
|
padding-left: unset;
|
|
|
|
padding-right: 5px;
|
|
|
|
margin-left: unset;
|
|
|
|
margin-right: 10px;
|
|
|
|
border-left: unset;
|
2023-03-20 22:08:47 +01:00
|
|
|
border-right: 5px solid hsl(0deg 0% 87%);
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|
|
|
|
|
2020-08-11 01:47:49 +02:00
|
|
|
/* Formatting for Markdown tables */
|
2023-03-17 22:10:10 +01:00
|
|
|
& table {
|
2019-07-31 20:37:06 +02:00
|
|
|
padding-right: 10px;
|
2021-11-05 03:33:16 +01:00
|
|
|
margin: 5px;
|
2019-07-31 20:37:06 +02:00
|
|
|
width: 99%;
|
2020-09-01 03:44:14 +02:00
|
|
|
display: block;
|
|
|
|
max-width: fit-content;
|
|
|
|
overflow-x: auto;
|
|
|
|
white-space: nowrap;
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& thead {
|
2023-03-20 22:08:47 +01:00
|
|
|
background-color: hsl(0deg 0% 93%);
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& tr {
|
2019-07-31 20:37:06 +02:00
|
|
|
display: table-row;
|
|
|
|
vertical-align: inherit;
|
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& tr th {
|
2023-03-20 22:08:47 +01:00
|
|
|
border: 1px solid hsl(0deg 0% 80%);
|
2019-07-31 20:37:06 +02:00
|
|
|
padding: 4px;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& tr td {
|
2023-03-20 22:08:47 +01:00
|
|
|
border: 1px solid hsl(0deg 0% 80%);
|
2019-07-31 20:37:06 +02:00
|
|
|
padding: 4px;
|
|
|
|
}
|
|
|
|
|
2020-03-22 23:07:41 +01:00
|
|
|
/* Emoji; sized to be easily understood while not overwhelming text. */
|
|
|
|
.emoji {
|
2023-03-06 05:49:39 +01:00
|
|
|
height: calc(20em / 14);
|
|
|
|
width: calc(20em / 14);
|
2020-03-22 23:07:41 +01:00
|
|
|
}
|
|
|
|
|
2019-07-31 20:47:28 +02:00
|
|
|
/* Mentions and alert words */
|
|
|
|
.user-mention-me :not(.silent) {
|
2023-03-20 22:08:47 +01:00
|
|
|
background-color: hsl(112deg 88% 87%);
|
2019-07-31 20:47:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.user-group-mention,
|
|
|
|
.user-mention {
|
|
|
|
border-radius: 3px;
|
|
|
|
padding: 0 0.2em;
|
2023-03-20 22:08:47 +01:00
|
|
|
box-shadow: 0 0 0 1px hsl(0deg 0% 80%);
|
2019-07-31 20:47:28 +02:00
|
|
|
margin-right: 2px;
|
|
|
|
margin-left: 2px;
|
|
|
|
white-space: nowrap;
|
2020-08-04 23:58:56 +02:00
|
|
|
background: linear-gradient(
|
|
|
|
to bottom,
|
2023-03-20 22:08:47 +01:00
|
|
|
hsl(0deg 0% 0% / 10%) 0%,
|
|
|
|
hsl(0deg 0% 0% / 0%) 100%
|
2020-08-04 23:58:56 +02:00
|
|
|
);
|
2019-07-31 20:47:28 +02:00
|
|
|
display: inline-block;
|
|
|
|
margin-bottom: 1px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.alert-word {
|
2023-03-31 08:31:30 +02:00
|
|
|
background-color: hsl(18deg 100% 84%);
|
2019-07-31 20:47:28 +02:00
|
|
|
}
|
|
|
|
|
2018-02-13 00:33:36 +01:00
|
|
|
/* Timestamps */
|
2023-03-17 22:10:10 +01:00
|
|
|
& time {
|
2023-03-20 22:08:47 +01:00
|
|
|
background: hsl(0deg 0% 93%);
|
2018-02-13 00:33:36 +01:00
|
|
|
border-radius: 3px;
|
|
|
|
padding: 0 0.2em;
|
2023-03-20 22:08:47 +01:00
|
|
|
box-shadow: 0 0 0 1px hsl(0deg 0% 80%);
|
2018-02-13 00:33:36 +01:00
|
|
|
white-space: nowrap;
|
|
|
|
margin-left: 2px;
|
|
|
|
margin-right: 2px;
|
|
|
|
display: inline-block;
|
|
|
|
margin-bottom: 1px;
|
|
|
|
}
|
|
|
|
|
2019-07-31 20:54:08 +02:00
|
|
|
/* LaTeX styling */
|
|
|
|
.katex-display {
|
2021-03-27 01:35:00 +01:00
|
|
|
/* KaTeX sometimes overdraws its bounding box by a little, so we
|
|
|
|
enlarge its scrolling area by stealing 3px from the margin
|
|
|
|
of the enclosing <p>. */
|
|
|
|
margin: -3px 0;
|
|
|
|
padding: 3px 0;
|
|
|
|
overflow: auto hidden;
|
2019-07-31 20:54:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.tex-error {
|
2023-03-20 22:08:47 +01:00
|
|
|
color: hsl(0deg 0% 50%);
|
2019-07-31 20:54:08 +02:00
|
|
|
}
|
|
|
|
|
2020-04-04 22:14:34 +02:00
|
|
|
/* Spoiler styling */
|
|
|
|
.spoiler-block {
|
2023-03-20 22:08:47 +01:00
|
|
|
border: hsl(0deg 0% 50%) 1px solid;
|
2020-04-04 22:14:34 +02:00
|
|
|
padding: 2px 8px 2px 10px;
|
|
|
|
border-radius: 10px;
|
|
|
|
position: relative;
|
|
|
|
top: 1px;
|
|
|
|
display: block;
|
2021-11-05 03:33:16 +01:00
|
|
|
margin: 5px 0 15px;
|
2020-04-04 22:14:34 +02:00
|
|
|
|
|
|
|
.spoiler-header {
|
|
|
|
padding: 5px;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.spoiler-content {
|
|
|
|
overflow: hidden;
|
2023-03-20 22:08:47 +01:00
|
|
|
border-top: hsl(0deg 0% 50%) 0 solid;
|
2020-08-04 23:58:56 +02:00
|
|
|
transition: height 0.4s ease-in-out, border-top 0.4s step-end,
|
|
|
|
padding 0.4s step-end;
|
2020-08-06 02:42:07 +02:00
|
|
|
padding: 0;
|
|
|
|
height: 0;
|
2020-04-04 22:14:34 +02:00
|
|
|
|
|
|
|
&.spoiler-content-open {
|
2023-03-20 22:08:47 +01:00
|
|
|
border-top: hsl(0deg 0% 50%) 1px solid;
|
2020-08-04 23:58:56 +02:00
|
|
|
transition: height 0.4s ease-in-out, border-top 0.4s step-start,
|
|
|
|
padding 0.4s step-start;
|
2020-04-04 22:14:34 +02:00
|
|
|
padding: 5px;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.spoiler-button {
|
|
|
|
float: right;
|
|
|
|
width: 25px;
|
|
|
|
height: 25px;
|
2021-10-16 21:57:26 +02:00
|
|
|
|
2020-04-04 22:14:34 +02:00
|
|
|
&:hover .spoiler-arrow {
|
|
|
|
&::before,
|
|
|
|
&::after {
|
2023-03-20 22:08:47 +01:00
|
|
|
background-color: hsl(0deg 0% 50%);
|
2020-04-04 22:14:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.spoiler-arrow {
|
|
|
|
float: right;
|
|
|
|
width: 13px;
|
|
|
|
height: 13px;
|
|
|
|
position: relative;
|
|
|
|
bottom: -5px;
|
|
|
|
left: -10px;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: 0.4s ease;
|
|
|
|
margin-top: 2px;
|
|
|
|
text-align: left;
|
|
|
|
transform: rotate(45deg);
|
2021-10-16 21:57:26 +02:00
|
|
|
|
2020-04-04 22:14:34 +02:00
|
|
|
&::before,
|
|
|
|
&::after {
|
|
|
|
position: absolute;
|
2020-08-04 23:58:56 +02:00
|
|
|
content: "";
|
2020-04-04 22:14:34 +02:00
|
|
|
display: inline-block;
|
|
|
|
width: 12px;
|
|
|
|
height: 3px;
|
2023-03-20 22:08:47 +01:00
|
|
|
background-color: hsl(0deg 0% 83%);
|
2020-04-04 22:14:34 +02:00
|
|
|
transition: 0.4s ease;
|
|
|
|
}
|
2021-10-16 21:57:26 +02:00
|
|
|
|
2020-04-04 22:14:34 +02:00
|
|
|
&::after {
|
|
|
|
position: absolute;
|
|
|
|
transform: rotate(90deg);
|
|
|
|
top: -5px;
|
|
|
|
left: 5px;
|
|
|
|
}
|
2021-10-16 21:57:26 +02:00
|
|
|
|
2020-04-04 22:14:34 +02:00
|
|
|
&.spoiler-button-open {
|
|
|
|
transform: rotate(45deg) translate(-5px, -5px);
|
2021-10-16 21:57:26 +02:00
|
|
|
|
2020-04-04 22:14:34 +02:00
|
|
|
&::before {
|
|
|
|
transform: translate(10px, 0);
|
|
|
|
}
|
2021-10-16 21:57:26 +02:00
|
|
|
|
2020-04-04 22:14:34 +02:00
|
|
|
&::after {
|
|
|
|
transform: rotate(90deg) translate(10px, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-31 20:37:06 +02:00
|
|
|
/* embedded link previews */
|
2019-07-31 21:01:58 +02:00
|
|
|
.message_inline_image_title {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.twitter-image,
|
|
|
|
.message_inline_image {
|
|
|
|
position: relative;
|
|
|
|
margin-bottom: 5px;
|
2022-02-14 05:41:17 +01:00
|
|
|
margin-right: 5px;
|
2022-02-08 16:33:10 +01:00
|
|
|
|
|
|
|
/* Sizing CSS for inline images requires care, because images load
|
|
|
|
asynchronously, and browsers will unfortunately jump your
|
|
|
|
scroll position when elements load above the current
|
|
|
|
position in the message feed in a way that changes the
|
|
|
|
height of elements. (As of March 2022, both Firefox and
|
|
|
|
Chrome exhibit this problem, though in Chrome it is pretty
|
|
|
|
subtle).
|
|
|
|
|
|
|
|
We prevent this by setting a fixed height for inline
|
|
|
|
previews. 100px is chosen because we don't want images to
|
|
|
|
overwhelm conversation in message feeds, as it does in chat
|
|
|
|
tools that show images at half-screen height or larger.
|
|
|
|
|
|
|
|
If there are several images next to each other, we display
|
|
|
|
them in a grid format; the same considerations requires
|
|
|
|
that either use a scrollable region or set a fixed width
|
|
|
|
for images so that the browser statically knows whether
|
|
|
|
it'll need to overflow. We choose fixed width here. */
|
2019-07-31 21:01:58 +02:00
|
|
|
height: 100px;
|
2022-02-08 16:33:10 +01:00
|
|
|
width: 150px;
|
|
|
|
|
|
|
|
/* Inline image containers also need an inline-block display in order
|
|
|
|
to implement the desired grid layout. */
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
/* Set a background for the image; the background will be visible for
|
|
|
|
messages whose aspect ratio is different from that of this
|
|
|
|
container. */
|
|
|
|
border: solid 1px transparent;
|
|
|
|
transition: background 0.3s ease;
|
2023-03-20 22:08:47 +01:00
|
|
|
background: hsl(0deg 0% 0% / 3%);
|
2022-02-08 16:33:10 +01:00
|
|
|
|
|
|
|
&:hover {
|
2023-03-20 22:08:47 +01:00
|
|
|
background: hsl(0deg 0% 0% / 15%);
|
2022-02-08 16:33:10 +01:00
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& a {
|
2022-02-08 16:33:10 +01:00
|
|
|
display: block;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2019-07-31 21:01:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
&.rtl .twitter-image,
|
|
|
|
&.rtl .message_inline_image {
|
|
|
|
margin-left: unset;
|
|
|
|
margin-right: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.twitter-tweet {
|
2023-03-20 22:08:47 +01:00
|
|
|
border: 1px solid hsl(0deg 0% 87%);
|
2020-08-04 23:58:56 +02:00
|
|
|
padding: 0.5em 0.75em;
|
2019-07-31 21:01:58 +02:00
|
|
|
margin-bottom: 0.25em;
|
|
|
|
word-break: break-word;
|
|
|
|
min-height: 48px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.twitter-avatar {
|
|
|
|
float: left;
|
|
|
|
width: 48px;
|
|
|
|
height: 48px;
|
2020-08-04 23:58:56 +02:00
|
|
|
margin-right: 0.75em;
|
2019-07-31 21:01:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.message_inline_ref {
|
|
|
|
margin-bottom: 5px;
|
|
|
|
margin-left: 5px;
|
|
|
|
height: 50px;
|
|
|
|
display: block !important;
|
|
|
|
border: none !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.rtl .message_inline_ref {
|
|
|
|
margin-left: unset;
|
|
|
|
margin-right: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.twitter-image img,
|
|
|
|
.message_inline_image img,
|
|
|
|
.message_inline_ref img {
|
2022-02-08 16:33:10 +01:00
|
|
|
/* We use `scale-down` so that images smaller than the container are
|
|
|
|
neither scaled up up or cropped to fit. This preserves
|
|
|
|
their aspect ratio, which is often helpful. */
|
|
|
|
object-fit: scale-down;
|
|
|
|
|
|
|
|
/* We need to explicitly specify the image dimensions to have
|
|
|
|
object-fit work; likely because internally object-fit needs
|
|
|
|
to know the frame it is targeting, and images don't default
|
|
|
|
to container dimensions. */
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
|
2019-07-31 21:01:58 +02:00
|
|
|
float: left;
|
|
|
|
margin-right: 10px;
|
2022-02-08 16:33:10 +01:00
|
|
|
border-radius: inherit;
|
2019-07-31 21:01:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.message_inline_image img {
|
|
|
|
cursor: zoom-in;
|
|
|
|
}
|
|
|
|
|
|
|
|
.youtube-video img,
|
|
|
|
.vimeo-video img,
|
|
|
|
.embed-video img {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.rtl .twitter-image img,
|
|
|
|
&.rtl .message_inline_image img,
|
|
|
|
&.rtl .message_inline_ref img {
|
|
|
|
float: right;
|
|
|
|
margin-right: unset;
|
|
|
|
margin-left: 10px;
|
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& li .message_inline_image img {
|
2019-07-31 21:01:58 +02:00
|
|
|
float: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.youtube-video .fa-play::before,
|
|
|
|
.embed-video .fa-play::before {
|
|
|
|
position: absolute;
|
|
|
|
margin: var(--margin-top, 32px) 0 0 var(--margin-left, 45px);
|
|
|
|
padding: 5px 8px 5px 10px;
|
|
|
|
font-size: 12px;
|
|
|
|
border-radius: 4px;
|
2023-03-20 22:08:47 +01:00
|
|
|
background-color: hsl(0deg 0% 0%);
|
|
|
|
color: hsl(0deg 0% 100%);
|
2019-07-31 21:01:58 +02:00
|
|
|
opacity: 0.7;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
|
2019-07-31 20:37:06 +02:00
|
|
|
.message_embed {
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
2020-08-06 02:42:07 +02:00
|
|
|
margin: 5px 0;
|
2019-07-31 20:37:06 +02:00
|
|
|
border: none;
|
2023-03-20 22:08:47 +01:00
|
|
|
border-left: 3px solid hsl(0deg 0% 93%);
|
2019-07-31 20:37:06 +02:00
|
|
|
height: 80px;
|
|
|
|
padding: 5px;
|
|
|
|
z-index: 1;
|
2023-03-20 22:08:47 +01:00
|
|
|
text-shadow: hsl(0deg 0% 0% / 1%) 0 0 1px;
|
2019-07-31 20:37:06 +02:00
|
|
|
|
|
|
|
.message_embed_title {
|
2020-08-06 02:42:07 +02:00
|
|
|
padding-top: 0;
|
2019-07-31 20:37:06 +02:00
|
|
|
/* to remove the spacing that the font has from the top of the container. */
|
|
|
|
margin-top: -5px;
|
|
|
|
|
|
|
|
font-size: 1.2em;
|
|
|
|
line-height: normal;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_embed_description {
|
|
|
|
position: relative;
|
|
|
|
max-width: 500px;
|
|
|
|
margin-top: 3px;
|
|
|
|
|
|
|
|
/* to put it below the container gradient. */
|
|
|
|
z-index: -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_embed_image {
|
|
|
|
display: inline-block;
|
|
|
|
width: 70px;
|
|
|
|
height: 70px;
|
|
|
|
background-size: cover;
|
|
|
|
background-position: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.data-container {
|
|
|
|
position: relative;
|
2020-08-06 02:42:07 +02:00
|
|
|
padding: 0 5px;
|
2019-07-31 20:37:06 +02:00
|
|
|
display: inline-block;
|
|
|
|
vertical-align: top;
|
|
|
|
max-width: calc(100% - 115px);
|
|
|
|
max-height: 80px;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.data-container div {
|
|
|
|
display: block;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.data-container::after {
|
|
|
|
content: " ";
|
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
height: 10%;
|
|
|
|
bottom: 0;
|
|
|
|
|
2020-08-04 23:58:56 +02:00
|
|
|
background: linear-gradient(
|
|
|
|
0deg,
|
2023-03-20 22:08:47 +01:00
|
|
|
hsl(0deg 0% 100%),
|
2020-08-04 23:58:56 +02:00
|
|
|
transparent 100%
|
|
|
|
);
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.rtl .message_embed {
|
|
|
|
border-left: unset;
|
2023-03-20 22:08:47 +01:00
|
|
|
border-right: 3px solid hsl(0deg 0% 93%);
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.message_embed > * {
|
|
|
|
display: inherit;
|
|
|
|
padding: 5px;
|
|
|
|
border: none;
|
|
|
|
}
|
2020-08-21 04:35:04 +02:00
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& a {
|
2023-03-20 22:08:47 +01:00
|
|
|
color: hsl(200deg 100% 40%);
|
2023-03-06 17:52:22 +01:00
|
|
|
text-decoration: none;
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& code {
|
2023-03-20 22:08:47 +01:00
|
|
|
color: hsl(200deg 100% 40%);
|
2023-03-06 18:05:34 +01:00
|
|
|
}
|
|
|
|
|
2023-03-06 17:52:22 +01:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
2023-03-20 22:08:47 +01:00
|
|
|
color: hsl(200deg 100% 25%);
|
2023-03-06 17:52:22 +01:00
|
|
|
text-decoration: underline;
|
2023-03-06 18:05:34 +01:00
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& code {
|
2023-03-20 22:08:47 +01:00
|
|
|
color: hsl(200deg 100% 25%);
|
2023-03-06 18:05:34 +01:00
|
|
|
}
|
2023-03-06 17:52:22 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& pre {
|
2023-03-08 13:38:33 +01:00
|
|
|
direction: ltr;
|
|
|
|
/* code block text is a bit smaller than normal text */
|
|
|
|
font-size: 0.825em;
|
|
|
|
line-height: 1.4;
|
|
|
|
white-space: pre;
|
|
|
|
overflow-x: auto;
|
|
|
|
word-break: break-all;
|
|
|
|
word-wrap: normal;
|
|
|
|
margin: 5px 0;
|
|
|
|
padding: 5px 7px 3px;
|
2023-03-20 22:08:47 +01:00
|
|
|
color: hsl(0deg 0% 20%);
|
2023-03-08 13:38:33 +01:00
|
|
|
display: block;
|
2023-03-20 22:08:47 +01:00
|
|
|
border: 1px solid hsl(0deg 0% 0% / 15%);
|
2023-03-08 13:38:33 +01:00
|
|
|
border-radius: 4px;
|
|
|
|
|
2020-08-21 15:56:00 +02:00
|
|
|
&:hover .copy_codeblock,
|
2020-09-06 09:16:07 +02:00
|
|
|
&:hover .code_external_link {
|
2020-08-21 15:56:00 +02:00
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& pre code {
|
2023-03-03 17:03:59 +01:00
|
|
|
font-size: inherit;
|
|
|
|
padding: 0;
|
|
|
|
white-space: inherit;
|
|
|
|
overflow-x: scroll;
|
|
|
|
color: inherit;
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
|
2023-03-17 22:10:10 +01:00
|
|
|
& code {
|
2023-03-06 18:05:34 +01:00
|
|
|
/* 11.55px when body is the default 14px; this is chosen to be
|
|
|
|
slightly above the 11.5px threshold where the height jumps by a
|
|
|
|
pixel on most platforms. */
|
|
|
|
font-size: 0.825em;
|
|
|
|
unicode-bidi: embed;
|
|
|
|
direction: ltr;
|
2023-03-20 22:08:47 +01:00
|
|
|
color: hsl(0deg 0% 0%);
|
2023-03-06 18:05:34 +01:00
|
|
|
white-space: pre-wrap;
|
|
|
|
padding: 0 4px;
|
2023-03-20 22:08:47 +01:00
|
|
|
background-color: hsl(0deg 0% 100%);
|
|
|
|
border: 1px solid hsl(240deg 13% 90%);
|
2023-03-06 18:05:34 +01:00
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
|
2022-02-08 00:13:33 +01:00
|
|
|
/* Style copy-to-clipboard button inside code blocks */
|
2020-08-21 04:35:04 +02:00
|
|
|
.copy_codeblock {
|
2020-08-21 15:56:00 +02:00
|
|
|
visibility: hidden;
|
2020-08-21 04:35:04 +02:00
|
|
|
/* Having absolute positioning here ensures that the element
|
|
|
|
doesn't scroll along with the code div in narrow windows */
|
|
|
|
position: absolute;
|
2020-08-28 15:49:24 +02:00
|
|
|
right: 2px;
|
2022-09-22 08:54:59 +02:00
|
|
|
margin-top: -4px;
|
2020-08-21 04:35:04 +02:00
|
|
|
}
|
2020-09-06 09:16:07 +02:00
|
|
|
|
|
|
|
.code_external_link {
|
|
|
|
visibility: hidden;
|
|
|
|
position: absolute;
|
|
|
|
right: 23px;
|
2022-09-22 08:54:59 +02:00
|
|
|
margin-top: -3px;
|
|
|
|
font-size: 17px;
|
2020-09-06 09:16:07 +02:00
|
|
|
/* The default icon and on-hover colors are inherited from <a> tag.
|
|
|
|
so we set our own to match the copy-to-clipbord icon */
|
2023-03-20 22:08:47 +01:00
|
|
|
color: hsl(0deg 0% 47%);
|
2020-09-06 09:16:07 +02:00
|
|
|
|
|
|
|
&:hover {
|
2023-03-20 22:08:47 +01:00
|
|
|
color: hsl(200deg 100% 40%);
|
2020-09-06 09:16:07 +02:00
|
|
|
}
|
|
|
|
}
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|
|
|
|
|
2020-08-21 05:11:01 +02:00
|
|
|
.preview_content .copy_codeblock {
|
|
|
|
/* We avoid displaying copy_codeblock button in previews, because it
|
|
|
|
feels odd given that you can just copy-paste the code out of
|
|
|
|
the "edit" state. We may change this decision when we add
|
|
|
|
menu options for viewing the code in a coding playground. */
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2021-03-25 15:10:11 +01:00
|
|
|
.informational-overlays .copy_codeblock {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2022-02-22 10:35:06 +01:00
|
|
|
.message_edit_history_content .copy_codeblock {
|
|
|
|
/* Copy code block button is hidden in edit history, this is done
|
|
|
|
because of issues faced in copying code blocks in edit history
|
|
|
|
modal. This may be changed later as we decide upon a proper ux
|
|
|
|
for displaying edit-history. */
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message_edit_history_content .code_external_link {
|
|
|
|
right: 5px;
|
|
|
|
}
|
|
|
|
|
2020-09-06 09:16:07 +02:00
|
|
|
.preview_content .code_external_link {
|
|
|
|
right: 12px;
|
|
|
|
}
|
|
|
|
|
2021-02-04 02:49:05 +01:00
|
|
|
@media (width < $sm_min) {
|
2019-07-31 20:37:06 +02:00
|
|
|
.rendered_markdown .message_embed {
|
|
|
|
height: auto;
|
|
|
|
|
|
|
|
.message_embed_image {
|
|
|
|
width: 100%;
|
|
|
|
height: 100px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.data-container {
|
|
|
|
display: block;
|
|
|
|
max-width: 100%;
|
|
|
|
margin-top: 10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-05 13:16:13 +02:00
|
|
|
.preview_content.rendered_markdown {
|
|
|
|
/* Ensure that the first child and last child
|
|
|
|
don't have blank area at the top and bottom respectively. */
|
|
|
|
& :first-child {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
& :last-child {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-31 20:37:06 +02:00
|
|
|
.codehilite {
|
|
|
|
display: block !important;
|
|
|
|
border: none !important;
|
|
|
|
background: none !important;
|
|
|
|
}
|
|
|
|
|
2020-08-27 05:33:56 +02:00
|
|
|
/* Both the horizontal scrollbar in <pre/> as well as
|
|
|
|
vertical scrollbar in the <textarea/> is styled similarly. */
|
2021-04-21 16:20:16 +02:00
|
|
|
.message_edit_form textarea,
|
2023-03-08 13:38:33 +01:00
|
|
|
.rendered_markdown pre {
|
2020-08-27 05:33:56 +02:00
|
|
|
/* Ensure the horizontal scrollbar is visible on Mac */
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
height: 8px;
|
|
|
|
width: 10px;
|
2023-03-20 22:08:47 +01:00
|
|
|
background-color: hsl(0deg 0% 0% / 5%);
|
2020-08-27 05:33:56 +02:00
|
|
|
}
|
2019-07-31 20:37:06 +02:00
|
|
|
|
2020-08-27 05:33:56 +02:00
|
|
|
&::-webkit-scrollbar-thumb {
|
2023-03-20 22:08:47 +01:00
|
|
|
background-color: hsl(0deg 0% 0% / 30%);
|
2020-08-27 05:33:56 +02:00
|
|
|
border-radius: 20px;
|
|
|
|
transition: all 0.2s ease;
|
|
|
|
}
|
2019-07-31 20:37:06 +02:00
|
|
|
|
2020-08-27 05:33:56 +02:00
|
|
|
&::-webkit-scrollbar-thumb:hover {
|
2023-03-20 22:08:47 +01:00
|
|
|
background-color: hsl(0deg 0% 0% / 60%);
|
2020-08-27 05:33:56 +02:00
|
|
|
}
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|
|
|
|
|
2019-07-31 21:04:36 +02:00
|
|
|
/* Search highlight used in both topics and rendered_markdown */
|
2019-07-31 20:37:06 +02:00
|
|
|
.highlight {
|
2023-03-31 08:31:30 +02:00
|
|
|
background-color: hsl(51deg 100% 79%);
|
2019-07-31 20:37:06 +02:00
|
|
|
}
|