1
0
Fork 0
forked from Mirrors/gomuks
nyxmuks/web/src/ui/timeline/content/index.css

181 lines
3 KiB
CSS

div.render-error-body {
font-style: italic;
color: var(--semisecondary-text-color);
}
div.decryption-error-body {
display: flex;
align-items: center;
> svg {
height: 20px;
color: var(--error-color);
}
}
div.redacted-body, div.decryption-pending-body {
display: flex;
align-items: center;
color: var(--secondary-text-color);
> svg {
height: 20px;
}
}
div.member-body {
display: flex;
align-items: center;
gap: .25rem;
}
div.message-text {
&.plaintext-body {
white-space: pre-wrap;
}
&.big-emoji-body {
font-size: 3rem;
}
&.notice-message {
opacity: .6;
}
&.emote-message::before {
content: "* " attr(data-event-sender) " ";
}
}
div.html-body {
overflow: hidden;
a.hicli-matrix-uri-user:not(.hicli-matrix-uri-plaintext),
a.hicli-matrix-uri-room-alias:not(.hicli-matrix-uri-plaintext) {
background-color: var(--pill-background-color);
border-radius: 1rem;
padding: 0 .25rem;
color: inherit;
text-decoration: none !important;
text-wrap: nowrap;
cursor: var(--clickable-cursor);
overflow: hidden;
max-width: 15rem;
text-overflow: ellipsis;
/* Required to allow setting max width and hiding overflow */
display: inline-block;
/* Required to not mess up the rest of the text's vertical alignment when using inline-block */
vertical-align: bottom;
}
img.hicli-custom-emoji {
/* This has to be the same alignment as matrix URIs above to look good
Middle may be nicer for emojis, but that doesn't work nicely with pills. */
vertical-align: bottom;
height: 2rem; /* text height is 1.5rem, so this will make lines a bit taller */
width: auto;
max-width: 5rem;
}
img.hicli-sizeless-inline-img {
height: 1.5rem;
width: auto;
max-width: 5rem;
}
span.hicli-spoiler {
filter: blur(4px);
transition: filter .5s;
cursor: var(--clickable-cursor);
&.spoiler-revealed {
filter: none;
cursor: initial;
}
&:not(.spoiler-revealed) a {
pointer-events: none;
}
}
blockquote {
border-left: 2px solid var(--blockquote-border-color);
padding-left: .5rem;
}
pre {
width: 100%;
max-height: max(50vh, 400px);
overflow: auto;
/* Ensure floating scroll bars have their own space */
padding-bottom: .5rem;
&.chroma {
background-color: var(--codeblock-background-color);
span.line > span.ln {
-webkit-user-select: initial;
user-select: initial;
&::before {
content: attr(data-linenum);
}
}
}
}
h1, h2, h3, h4, h5, h6 {
margin: 0 0 .5rem;
}
h1, h2 {
font-size: 1.5em;
}
h3 {
font-size: 1.25em;
}
ul, ol, dl, table, pre, blockquote {
&:not(:last-child) {
margin: 0 0 .25rem;
}
&:last-child {
margin: 0;
}
}
p {
&:not(:last-child) {
margin: 0 0 1rem;
}
&:last-child {
margin: 0;
}
}
}
div.media-container {
&.video-container {
width: 100%;
height: 240px;
}
> a {
display: flex;
align-items: center;
text-decoration: none;
color: inherit;
}
> img {
max-width: 100%;
max-height: 100%;
}
> video {
min-width: 320px;
max-width: 100%;
height: 100%;
}
}