Mangane/app/styles/components/status.scss

681 lines
11 KiB
SCSS

.status__content {
p,
li {
strong {
font-weight: bold;
}
}
p,
li {
em {
font-style: italic;
}
}
ul,
ol {
margin-left: 20px;
}
ul {
list-style: disc outside none;
}
ol {
list-style: decimal outside none;
}
blockquote {
padding: 5px 0 5px 15px;
border-left: 3px solid hsla(var(--primary-text-color_hsl), 0.4);
color: var(--primary-text-color--faint);
}
code {
font-family: 'Roboto Mono', monospace;
cursor: text;
}
/* Inline code */
p > code {
padding: 2px 4px;
background-color: var(--background-color);
border-radius: 4px;
}
/* Code block */
pre {
line-height: 1.6em;
overflow-x: auto;
border-radius: 6px;
padding: 8px 12px;
margin-bottom: 20px;
word-break: break-all;
background-color: var(--background-color);
}
/* Markdown images */
img:not(.emojione):not([width][height]) {
width: 100%;
height: 285.188px;
object-fit: contain;
background: var(--background-color);
border-radius: 4px;
overflow: hidden;
margin: 20px 0;
display: block;
}
&--big {
line-height: normal !important;
img.emojione {
display: inline;
width: 36px;
height: 36px;
padding: 5px;
}
}
}
.status__content > ul,
.status__content > ol {
margin-bottom: 20px;
}
.status__content > blockquote {
margin-bottom: 20px;
}
.status__content--with-action {
cursor: pointer;
}
.status__content.status__content--collapsed {
max-height: 20px * 15; // 15 lines is roughly above 500 characters
}
.status__content__read-more-button {
display: block;
font-size: 15px;
line-height: 20px;
color: var(--highlight-text-color);
border: 0;
background: transparent;
padding: 0;
padding-top: 8px;
&:hover,
&:active {
text-decoration: underline;
}
}
.status__content__spoiler-link {
display: inline-block;
border-radius: 2px;
background: transparent;
border: 0;
color: var(--primary-text-color);
font-weight: 700;
font-size: 11px;
padding: 0 6px;
text-transform: uppercase;
line-height: 20px;
cursor: pointer;
vertical-align: middle;
}
.status__wrapper--filtered {
color: var(--primary-text-color--faint);
border: 0;
font-size: inherit;
text-align: center;
line-height: inherit;
margin: 0;
padding: 15px;
box-sizing: border-box;
width: 100%;
clear: both;
}
.status__prepend-icon-wrapper {
left: -26px;
position: absolute;
svg.feather-repeat {
color: var(--highlight-text-color);
}
}
.status__prepend-icon--pinned.svg-icon {
width: 18px;
height: 18px;
margin-top: -1px;
svg {
stroke-width: 1.5px;
}
}
.status-link {
@apply hover:underline text-primary-600 dark:text-primary-400 hover:text-primary-800 dark:hover:text-primary-500;
}
.status {
@apply min-h-[54px] cursor-default;
@supports (-ms-overflow-style: -ms-autohiding-scrollbar) {
// Add margin to avoid Edge auto-hiding scrollbar appearing over content.
// On Edge 16 this is 16px and Edge <=15 it's 12px, so aim for 16px.
padding-right: 26px; // 10px + 16px
}
@keyframes fade {
0% { opacity: 0; }
100% { opacity: 1; }
}
opacity: 1;
animation: fade 150ms linear;
.video-player,
.audio-player {
margin-top: 8px;
}
&.light {
.status__relative-time {
color: var(--primary-text-color--faint);
}
.status__display-name {
color: var(--primary-text-color--faint);
}
.display-name {
strong {
color: var(--primary-text-color);
}
span {
color: var(--primary-text-color--faint);
}
}
.status__content {
color: var(--primary-text-color);
a {
color: var(--highlight-text-color);
}
a.status__content__spoiler-link {
color: var(--primary-text-color);
background: var(--brand-color);
&:hover {
background: var(--brand-color);
}
}
}
}
&__meta {
font-size: 14px;
color: var(--primary-text-color--faint);
a {
color: var(--brand-color);
font-weight: bold;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
}
.status__wrapper {
@apply bg-white dark:bg-slate-800 px-4 py-6 sm:shadow-xl dark:sm:shadow-inset sm:p-5 sm:rounded-xl;
}
[column-type=filled] .status__wrapper,
[column-type=filled] .status-placeholder {
@apply rounded-none shadow-none p-4;
}
.status__display-name {
color: var(--primary-text-color--faint);
}
.status__info .status__display-name {
display: block;
max-width: 100%;
}
.status__info {
font-size: 15px;
z-index: 4;
}
.status__profile,
.detailed-status__profile {
display: block;
max-width: 100%;
}
.status__profile {
padding-right: 25px;
}
.status-check-box {
border-bottom: 1px solid var(--background-color);
display: flex;
.status-check-box__status {
margin: 10px 0 10px 10px;
flex: 1;
.media-gallery {
max-width: 250px;
}
.status__content {
padding: 0;
white-space: normal;
}
.video-player,
.audio-player {
margin-top: 8px;
max-width: 250px;
}
.media-gallery__item-thumbnail {
cursor: default;
}
}
}
.status-check-box-toggle {
align-items: center;
display: flex;
flex: 0 0 auto;
justify-content: center;
padding: 10px;
}
.status__prepend {
margin-left: 68px;
color: var(--primary-text-color);
padding: 8px 0;
padding-bottom: 2px;
font-size: 14px;
position: relative;
.status__display-name strong {
color: var(--primary-text-color);
}
> span {
display: block;
overflow: hidden;
text-overflow: ellipsis;
}
}
.status__action-bar {
align-items: center;
display: flex;
margin-top: 25px;
z-index: 4;
&__counter {
display: inline-flex;
margin-right: 22px;
align-items: center;
.status__action-bar-button {
margin-right: 8px;
}
&__label {
display: inline-block;
width: 14px;
font-size: 12px;
font-weight: 500;
color: var(--brand-color);
}
}
}
.status__action-bar-button {
margin-right: 18px;
}
.status__action-bar-dropdown {
height: 23.15px;
width: 23.15px;
}
.status__avatar {
height: 48px;
left: 10px;
position: absolute;
top: 10px;
width: 48px;
}
.status__expand {
width: 68px;
position: absolute;
left: 0;
top: 0;
height: 100%;
cursor: pointer;
}
.status__content,
.reply-indicator__content {
@apply text-gray-900 dark:text-gray-300 break-words text-ellipsis overflow-hidden relative;
&:focus {
@apply outline-none;
}
&.status__content--with-spoiler {
@apply whitespace-normal;
.status__content__text {
@apply whitespace-pre-wrap;
}
}
.emojione {
width: 20px;
height: 20px;
margin: -3px 0 0;
display: inline;
}
p {
margin-bottom: 20px;
white-space: pre-wrap;
&:last-child {
margin-bottom: 2px;
}
}
a {
@apply text-primary-600 dark:text-primary-400 hover:underline;
.fa {
color: var(--primary-text-color);
}
}
.status__content__spoiler-link {
background: var(--brand-color--med);
transition: 0.2s;
&:hover,
&:focus {
background: hsla(var(--brand-color_hsl), 0.5);
text-decoration: none;
}
&::-moz-focus-inner {
border: 0;
}
&::-moz-focus-inner,
&:focus,
&:active {
outline: 0 !important;
}
}
.status__content__text {
display: none;
&.status__content__text--visible {
display: block;
}
}
}
.underline-links {
.status__content,
.reply-indicator__content {
a {
text-decoration: underline;
}
}
}
.focusable:focus,
.focusable-within:focus-within {
outline: 0; /* Required b/c HotKeys lib sets this outline */
@apply ring-2 ring-primary-300;
.status.status-direct {
&.muted {
background: transparent;
}
}
}
.status-card {
@apply flex text-sm border border-solid border-gray-200 dark:border-gray-700 rounded-lg text-gray-800 dark:text-gray-200 mt-3 min-h-[150px] no-underline overflow-hidden;
}
a.status-card {
@apply cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-900 hover:no-underline;
}
.status-card-photo {
@apply cursor-zoom-in block no-underline w-full h-auto;
}
.status-card-video,
.status-card-audio {
iframe {
width: 100% !important;
height: 100% !important;
}
}
.status-card__title {
@apply block font-medium mb-2 text-gray-800 dark:text-gray-200 no-underline;
}
.status-card__content {
@apply flex-1 overflow-hidden p-4;
}
.status-card__description {
@apply text-gray-500 dark:text-gray-400;
}
.status-card__host {
display: flex;
margin-top: 10px;
font-size: 13px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
align-items: center;
.svg-icon {
height: 15px;
width: 15px;
margin-right: 3px;
}
}
.status-card__image {
flex: 0 0 40%;
background: var(--brand-color--med);
position: relative;
& > .svg-icon {
width: 40px;
height: 40px;
position: absolute;
transform-origin: 50% 50%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
svg {
stroke-width: 1px;
}
}
&--empty {
flex: 0 0 80px;
}
}
.status-card.horizontal {
display: block;
.status-card__title {
white-space: inherit;
}
}
.status-card.compact {
@apply border-gray-200 dark:border-gray-700;
}
.status-card__image-image {
@apply block w-full h-full object-cover bg-cover bg-center;
}
.status-card--link {
@apply flex flex-col md:flex-row;
}
.status-card--link .status-card__image {
@apply w-full rounded-l md:w-auto h-[200px] md:h-auto flex-none md:flex-auto;
}
.status__favicon {
width: 16px;
height: 16px;
float: right;
margin-right: 4px;
img {
width: 100%;
max-height: 100%;
}
}
.tombstone {
padding: 10px;
text-align: center;
font-size: 14px;
border-bottom: 1px solid var(--brand-color--faint);
color: var(--primary-text-color--faint);
p {
padding: 10px;
background: var(--background-color);
border-radius: 4px;
}
}
.status__action-bar,
.detailed-status__action-bar {
.emoji-picker-expand {
display: none;
}
&:focus-within {
.emoji-picker-expand {
display: inline-flex;
width: 0;
height: 0;
overflow: hidden;
&:focus-within {
width: unset;
}
}
}
}
.material-status {
padding-bottom: 10px;
&__status {
@include standard-panel;
padding: 15px 0 10px;
}
.status {
padding: 8px 10px;
&__avatar {
position: relative;
margin-right: 10px;
top: 0;
left: 0;
}
&__profile {
display: flex;
align-items: center;
}
&__content {
padding-top: 10px;
}
&__display-name {
.display-name__account {
display: block;
}
}
}
}
@media screen and (min-width: 630px) {
.columns-area .material-status .status {
padding: 15px;
&__avatar {
top: 0;
left: 0;
}
&__content {
padding-top: 10px;
}
}
}
.attachment-thumbs {
position: relative;
&__clickable-region {
cursor: pointer;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
}
.pending-status {
opacity: 0.5;
}