diff --git a/app/soapbox/components/status-content.css b/app/soapbox/components/status-content.css index 1c9e9dff90..3d38b6eb43 100644 Binary files a/app/soapbox/components/status-content.css and b/app/soapbox/components/status-content.css differ diff --git a/app/soapbox/components/status_content.tsx b/app/soapbox/components/status_content.tsx index 468cb6d72f..7d771ec373 100644 --- a/app/soapbox/components/status_content.tsx +++ b/app/soapbox/components/status_content.tsx @@ -49,7 +49,7 @@ const SpoilerButton: React.FC = ({ onClick, hidden, tabIndex }) 'inline-block rounded-md px-1.5 py-0.5 ml-[0.5em]', 'text-gray-900 dark:text-gray-100', 'font-bold text-[11px] uppercase', - 'bg-primary-100 dark:bg-primary-900', + 'bg-primary-100 dark:bg-primary-800', 'hover:bg-primary-300 dark:hover:bg-primary-600', 'focus:bg-primary-200 dark:focus:bg-primary-600', 'hover:no-underline', @@ -213,13 +213,16 @@ const StatusContent: React.FC = ({ status, expanded = false, onE } const isHidden = onExpandedToggle ? !expanded : hidden; + const withSpoiler = status.spoiler_text.length > 0; + + const baseClassName = 'text-gray-900 dark:text-gray-100 break-words text-ellipsis overflow-hidden relative focus:outline-none'; const content = { __html: parsedHtml }; const spoilerContent = { __html: status.spoilerHtml }; const directionStyle: React.CSSProperties = { direction: 'ltr' }; - const className = classNames('status-content', { + const className = classNames(baseClassName, 'status-content', { 'cursor-pointer': onClick, - 'status__content--with-spoiler': status.spoiler_text.length > 0, + 'whitespace-normal': withSpoiler, 'max-h-[300px]': collapsed, 'leading-normal big-emoji': onlyEmoji, }); @@ -243,8 +246,10 @@ const StatusContent: React.FC = ({ status, expanded = false, onE
= ({ status, expanded = false, onE ref={node} tabIndex={0} key='content' - className={classNames('status-content', { + className={classNames(baseClassName, 'status-content', { 'leading-normal big-emoji': onlyEmoji, })} style={directionStyle} diff --git a/app/styles/components/status.scss b/app/styles/components/status.scss index c46dfc7ee9..a8c8e4561f 100644 --- a/app/styles/components/status.scss +++ b/app/styles/components/status.scss @@ -94,63 +94,6 @@ padding: 10px; } -.status__content { - @apply text-gray-900 dark:text-gray-100 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-accent-blue hover:underline; - - .fa { - color: var(--primary-text-color); - } - } - - .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 */