488 lines
10 KiB
CSS
488 lines
10 KiB
CSS
/* Mastodon embed timeline v4.3.2 */
|
|
/* More info at: */
|
|
/* https://gitlab.com/idotj/mastodon-embed-timeline */
|
|
|
|
/* Variables */
|
|
.mt-container,
|
|
.mt-container[data-theme="light"] {
|
|
--mt-txt-max-lines: none;
|
|
--mt-color-bg: #fff;
|
|
--mt-color-bg-hover: #d9e1e8;
|
|
--mt-color-line-gray: #c0cdd9;
|
|
--mt-color-contrast-gray: #606984;
|
|
--mt-color-content-txt: #000;
|
|
--mt-color-link: #3a3bff;
|
|
--mt-color-error-txt: #8b0000;
|
|
--mt-color-btn-bg: #6364ff;
|
|
--mt-color-btn-bg-hover: #563acc;
|
|
--mt-color-btn-txt: #fff;
|
|
}
|
|
.mt-container[data-theme="dark"] {
|
|
--mt-color-bg: #282c37;
|
|
--mt-color-bg-hover: #313543;
|
|
--mt-color-line-gray: #393f4f;
|
|
--mt-color-contrast-gray: #606984;
|
|
--mt-color-content-txt: #fff;
|
|
--mt-color-link: #8c8dff;
|
|
--mt-color-error-txt: #fe6c6c;
|
|
}
|
|
|
|
/* Reset CSS */
|
|
.mt-container button {
|
|
font: inherit;
|
|
}
|
|
.mt-container a,
|
|
.mt-container button {
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Main container */
|
|
.mt-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
position: relative;
|
|
background-color: var(--mt-color-bg);
|
|
scrollbar-color: var(--mt-color-contrast-gray) var(--mt-color-bg);
|
|
scrollbar-width: auto;
|
|
}
|
|
.mt-container::-webkit-scrollbar {
|
|
width: 0.25rem;
|
|
height: 0.25rem;
|
|
}
|
|
.mt-container::-webkit-scrollbar-thumb {
|
|
background-color: var(--mt-color-contrast-gray);
|
|
border: none;
|
|
border-radius: 3rem;
|
|
}
|
|
.mt-container::-webkit-scrollbar-thumb:hover,
|
|
.mt-container::-webkit-scrollbar-thumb:active {
|
|
background-color: var(--mt-color-contrast-gray);
|
|
}
|
|
.mt-container::-webkit-scrollbar-track {
|
|
background-color: var(--mt-color-bg);
|
|
border: none;
|
|
border-radius: 0;
|
|
}
|
|
.mt-container::-webkit-scrollbar-track:hover,
|
|
.mt-container::-webkit-scrollbar-track:active,
|
|
.mt-container::-webkit-scrollbar-corner {
|
|
background-color: var(--mt-color-bg);
|
|
}
|
|
.mt-container a:link,
|
|
.mt-container a:active,
|
|
.mt-container a {
|
|
text-decoration: none;
|
|
color: var(--mt-color-link);
|
|
}
|
|
.mt-container a:not(.mt-post-preview):hover {
|
|
text-decoration: underline;
|
|
}
|
|
.mt-body {
|
|
padding: 1rem clamp(0.25rem, 4vw, 1rem);
|
|
white-space: pre-wrap;
|
|
word-wrap: break-word;
|
|
margin-bottom: 1rem;
|
|
}
|
|
.mt-body .invisible {
|
|
font-size: 0;
|
|
line-height: 0;
|
|
display: inline-block;
|
|
width: 0;
|
|
height: 0;
|
|
position: absolute;
|
|
}
|
|
|
|
/* Post container */
|
|
.mt-post {
|
|
margin: 0.25rem;
|
|
padding: 1rem 0.5rem;
|
|
position: relative;
|
|
min-height: 3.75rem;
|
|
background-color: transparent;
|
|
border-bottom: 1px solid var(--mt-color-line-gray);
|
|
}
|
|
.mt-post:hover,
|
|
.mt-post:focus {
|
|
cursor: pointer;
|
|
background-color: var(--mt-color-bg-hover);
|
|
}
|
|
.mt-post p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* User avatar */
|
|
.mt-post-avatar {
|
|
margin-right: 0.75rem;
|
|
}
|
|
.mt-post-avatar-standard {
|
|
width: 2.25rem;
|
|
height: 2.25rem;
|
|
}
|
|
.mt-post-avatar-boosted {
|
|
width: 3rem;
|
|
height: 3rem;
|
|
position: relative;
|
|
}
|
|
.mt-post-avatar-image-big img {
|
|
aspect-ratio: 1/1;
|
|
width: 2.25rem;
|
|
height: 2.25rem;
|
|
border-radius: 0.25rem;
|
|
overflow: hidden;
|
|
}
|
|
.mt-post-avatar-image-small img {
|
|
aspect-ratio: 1/1;
|
|
width: 1.5rem;
|
|
height: 1.5rem;
|
|
top: 1.5rem;
|
|
left: 1.5rem;
|
|
position: absolute;
|
|
border-radius: 0.25rem;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* User name and date */
|
|
.mt-post-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 1rem;
|
|
}
|
|
.mt-post-header-user {
|
|
overflow: hidden;
|
|
padding-right: 0.75rem;
|
|
}
|
|
.mt-post-header-user .mt-custom-emoji {
|
|
height: 1rem;
|
|
min-width: 1rem;
|
|
width: auto;
|
|
}
|
|
.mt-post-header-user > a {
|
|
color: var(--mt-color-content-txt) !important;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.mt-container .mt-post-header-user > a:hover {
|
|
text-decoration: none;
|
|
}
|
|
.mt-post-header-user-name {
|
|
font-weight: 600;
|
|
}
|
|
.mt-container .mt-post-header-user:hover .mt-post-header-user-name {
|
|
text-decoration: underline;
|
|
}
|
|
.mt-post-header-user-account {
|
|
display: block;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
color: var(--mt-color-contrast-gray);
|
|
}
|
|
.mt-post-header-date {
|
|
display: flex;
|
|
font-size: 0.75rem;
|
|
text-align: right;
|
|
margin-left: auto;
|
|
}
|
|
.mt-post-header-date .mt-post-pinned {
|
|
width: 1.25rem;
|
|
margin-top: -0.25rem;
|
|
fill: var(--mt-color-contrast-gray);
|
|
}
|
|
.mt-container .mt-post-header-date > a {
|
|
white-space: nowrap;
|
|
color: var(--mt-color-contrast-gray) !important;
|
|
}
|
|
|
|
/* Text */
|
|
.mt-post-txt {
|
|
margin-bottom: 1rem;
|
|
color: var(--mt-color-content-txt);
|
|
}
|
|
.mt-post-txt .spoiler-txt-hidden {
|
|
display: none;
|
|
}
|
|
.mt-post-txt.truncate {
|
|
display: -webkit-box;
|
|
overflow: hidden;
|
|
-webkit-line-clamp: var(--mt-txt-max-lines);
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
.mt-post-txt:not(.truncate) .ellipsis::after {
|
|
content: "...";
|
|
}
|
|
.mt-post-txt blockquote {
|
|
border-left: 0.25rem solid var(--mt-color-line-gray);
|
|
margin-left: 0;
|
|
padding-left: 0.5rem;
|
|
}
|
|
.mt-post-txt .mt-custom-emoji {
|
|
height: 1.5rem;
|
|
min-width: 1.5rem;
|
|
margin-bottom: -0.25rem;
|
|
width: auto;
|
|
}
|
|
|
|
/* Poll */
|
|
.mt-post-poll {
|
|
margin-bottom: 1rem;
|
|
color: var(--mt-color-content-txt);
|
|
}
|
|
.mt-post-poll ul {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
.mt-post-poll ul li {
|
|
font-size: 0.9rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
.mt-post-poll.mt-post-poll-expired ul li {
|
|
color: var(--mt-color-contrast-gray);
|
|
}
|
|
.mt-post-poll ul li:not(:last-child) {
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
.mt-post-poll ul li:before {
|
|
content: "◯";
|
|
padding-right: 0.5rem;
|
|
}
|
|
.mt-post-poll.mt-post-poll-expired ul li:before {
|
|
content: "";
|
|
padding-right: 0;
|
|
}
|
|
|
|
/* Medias */
|
|
.mt-post-media {
|
|
position: relative;
|
|
overflow: hidden;
|
|
margin-bottom: 1rem;
|
|
}
|
|
.mt-post-media-spoiler > img,
|
|
.mt-post-media-spoiler > audio,
|
|
.mt-post-media-spoiler > video,
|
|
.mt-post-media-spoiler > .mt-post-media-play-icon {
|
|
filter: blur(2rem);
|
|
pointer-events: none;
|
|
}
|
|
.mt-post-media > audio {
|
|
width: 100%;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
.mt-post-media > img,
|
|
.mt-post-media > video {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
text-align: center;
|
|
color: var(--mt-color-content-txt);
|
|
}
|
|
.mt-post-media.mt-loading-spinner .mt-post-media-play-icon {
|
|
display: none;
|
|
}
|
|
.mt-post-media-play-icon {
|
|
display: flex;
|
|
position: absolute;
|
|
width: 3rem;
|
|
height: 3rem;
|
|
top: calc(50% - 1.5rem);
|
|
left: calc(50% - 1.5rem);
|
|
justify-content: center;
|
|
align-items: center;
|
|
background-color: transparent;
|
|
border: none;
|
|
cursor: pointer;
|
|
}
|
|
.mt-post-media-play-icon > svg {
|
|
width: 2.5rem;
|
|
height: 2.5rem;
|
|
fill: var(--mt-color-bg);
|
|
stroke: var(--mt-color-content-txt);
|
|
stroke-width: 1px;
|
|
}
|
|
|
|
/* Preview link */
|
|
.mt-post-preview {
|
|
min-height: 4rem;
|
|
display: flex;
|
|
flex-direction: row;
|
|
border: 1px solid var(--mt-color-line-gray);
|
|
border-radius: 0.5rem;
|
|
color: var(--mt-color-link);
|
|
font-size: 0.8rem;
|
|
margin: 1rem 0;
|
|
overflow: hidden;
|
|
}
|
|
.mt-post-preview-image {
|
|
width: 40%;
|
|
align-self: stretch;
|
|
}
|
|
.mt-post-preview-image img {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
color: var(--mt-color-content-txt);
|
|
}
|
|
.mt-post-preview-noImage {
|
|
width: 40%;
|
|
font-size: 1.5rem;
|
|
align-self: center;
|
|
text-align: center;
|
|
}
|
|
.mt-post-preview-content {
|
|
width: 60%;
|
|
display: flex;
|
|
align-self: center;
|
|
flex-direction: column;
|
|
padding: 0.5rem 1rem;
|
|
gap: 0.5rem;
|
|
}
|
|
.mt-post-preview-title {
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Counter bar */
|
|
.mt-post-counter-bar {
|
|
display: flex;
|
|
min-width: 6rem;
|
|
max-width: 40rem;
|
|
justify-content: space-between;
|
|
color: var(--mt-color-contrast-gray);
|
|
}
|
|
.mt-post-counter-bar-replies,
|
|
.mt-post-counter-bar-reblog,
|
|
.mt-post-counter-bar-favorites {
|
|
display: flex;
|
|
font-size: 0.75rem;
|
|
gap: 0.25rem;
|
|
align-items: center;
|
|
opacity: 0.5;
|
|
}
|
|
.mt-post-counter-bar-replies > svg,
|
|
.mt-post-counter-bar-reblog > svg,
|
|
.mt-post-counter-bar-favorites > svg {
|
|
width: 1rem;
|
|
fill: var(--mt-color-contrast-gray);
|
|
}
|
|
|
|
/* Buttons */
|
|
.mt-container .mt-btn-dark {
|
|
display: flex;
|
|
border-radius: 0.25rem;
|
|
background-color: var(--mt-color-line-gray);
|
|
border: 0;
|
|
color: var(--mt-color-content-txt);
|
|
font-weight: 600;
|
|
font-size: 0.75rem;
|
|
text-align: center;
|
|
padding: 0 0.5rem;
|
|
line-height: 1.25rem;
|
|
|
|
vertical-align: top;
|
|
}
|
|
.mt-container .mt-btn-violet,
|
|
.mt-container a.mt-btn-violet {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
border-radius: 0.25rem;
|
|
border: 0.5rem;
|
|
padding: 0.5rem 0.75rem;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
text-align: center;
|
|
background-color: var(--mt-color-btn-bg);
|
|
color: var(--mt-color-btn-txt);
|
|
}
|
|
.mt-container .mt-btn-violet:hover,
|
|
.mt-container a.mt-btn-violet:hover {
|
|
background-color: var(--mt-color-btn-bg-hover);
|
|
text-decoration: none;
|
|
}
|
|
.mt-post-txt .mt-btn-spoiler {
|
|
display: inline-block;
|
|
}
|
|
.mt-post-media.mt-loading-spinner > .mt-btn-spoiler {
|
|
display: none;
|
|
}
|
|
.mt-post-media > .mt-btn-spoiler {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
z-index: 2;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
|
|
/* Error */
|
|
.mt-error {
|
|
position: absolute;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: calc(100% - 3.5rem);
|
|
width: calc(100% - 4.5rem);
|
|
justify-content: center;
|
|
align-items: center;
|
|
color: var(--mt-color-error-txt);
|
|
padding: 0.75rem;
|
|
text-align: center;
|
|
}
|
|
.mt-error-icon {
|
|
font-size: 2rem;
|
|
}
|
|
.mt-error-message {
|
|
width: 100%;
|
|
padding: 1rem 0;
|
|
}
|
|
.mt-error-message hr {
|
|
color: var(--mt-color-line-gray);
|
|
}
|
|
|
|
/* Loading spinner */
|
|
.mt-body > .mt-loading-spinner {
|
|
position: absolute;
|
|
width: 3rem;
|
|
height: 3rem;
|
|
margin: auto;
|
|
top: calc(50% - 1.5rem);
|
|
right: calc(50% - 1.5rem);
|
|
}
|
|
.mt-loading-spinner {
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 128'%3E%3Cg%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 64 64' to='360 64 64' dur='1000ms' repeatCount='indefinite'/%3E%3Cpath d='M64 6.69a57.3 57.3 0 1 1 0 114.61A57.3 57.3 0 0 1 6.69 64' fill='none' stroke='%23404040' stroke-width='12'/%3E%3C/g%3E%3C/svg%3E");
|
|
background-repeat: no-repeat;
|
|
background-position: center center;
|
|
background-color: transparent;
|
|
background-size: min(2.5rem, calc(100% - 0.5rem));
|
|
}
|
|
|
|
/* Footer */
|
|
.mt-footer {
|
|
display: flex;
|
|
flex-flow: wrap;
|
|
margin: auto auto 2rem auto;
|
|
padding: 0 1.5rem;
|
|
gap: 1.5rem;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* Hidden elements */
|
|
.visually-hidden {
|
|
position: absolute !important;
|
|
width: 1px !important;
|
|
height: 1px !important;
|
|
padding: 0 !important;
|
|
margin: -1px !important;
|
|
overflow: hidden !important;
|
|
clip: rect(0, 0, 0, 0) !important;
|
|
white-space: nowrap !important;
|
|
border: 0 !important;
|
|
}
|