From 80388d2cdc085f28da6d85e301d71e1494be8a58 Mon Sep 17 00:00:00 2001 From: danidfra Date: Wed, 6 Nov 2024 02:27:19 -0300 Subject: [PATCH] Change "thread" and "status--wrapper" to custom Tailwind --- src/components/status.tsx | 6 ++-- src/features/event/event-discussion.tsx | 2 +- .../components/placeholder-status.tsx | 2 +- .../components/scheduled-status.tsx | 2 +- src/features/ui/components/pending-status.tsx | 2 +- src/styles/components/detailed-status.scss | 4 +-- src/styles/components/notification.scss | 2 +- src/styles/components/reply-mentions.scss | 2 +- src/styles/components/status.scss | 2 +- src/styles/tailwind.css | 35 +++++++++++++++++++ 10 files changed, 47 insertions(+), 12 deletions(-) diff --git a/src/components/status.tsx b/src/components/status.tsx index 022eab385..81665466c 100644 --- a/src/components/status.tsx +++ b/src/components/status.tsx @@ -333,7 +333,7 @@ const Status: React.FC = (props) => { return ( -
+
{/* eslint-disable formatjs/no-literal-string-in-jsx */} : {status.filtered.join(', ')}. @@ -412,7 +412,7 @@ const Status: React.FC = (props) => { > = (props) => { avatarSize={avatarSize} /> -
+
= (props) => { {me &&
} -
+
= ({ variant }) => (
-
+
diff --git a/src/features/scheduled-statuses/components/scheduled-status.tsx b/src/features/scheduled-statuses/components/scheduled-status.tsx index 6e71f7cbe..8fb1de473 100644 --- a/src/features/scheduled-statuses/components/scheduled-status.tsx +++ b/src/features/scheduled-statuses/components/scheduled-status.tsx @@ -31,7 +31,7 @@ const ScheduledStatus: React.FC = ({ statusId, ...other }) => const account = status.account; return ( -
+
diff --git a/src/features/ui/components/pending-status.tsx b/src/features/ui/components/pending-status.tsx index 1ed4e5502..4a9f0a5d4 100644 --- a/src/features/ui/components/pending-status.tsx +++ b/src/features/ui/components/pending-status.tsx @@ -78,7 +78,7 @@ const PendingStatus: React.FC = ({ idempotencyKey, className, mu
-
+
diff --git a/src/styles/components/detailed-status.scss b/src/styles/components/detailed-status.scss index 2edea3294..ccefc753e 100644 --- a/src/styles/components/detailed-status.scss +++ b/src/styles/components/detailed-status.scss @@ -4,12 +4,12 @@ &__status { @apply relative pb-4; - .status__wrapper { + .status--wrapper { @apply shadow-none p-0; } } - .status__content-wrapper { + .status--content-wrapper { @apply pl-[calc(42px+12px)] rtl:pl-0 rtl:pr-[calc(42px+12px)]; } } diff --git a/src/styles/components/notification.scss b/src/styles/components/notification.scss index 63439e79a..d593c6f2e 100644 --- a/src/styles/components/notification.scss +++ b/src/styles/components/notification.scss @@ -1,3 +1,3 @@ -.notification .status__wrapper { +.notification .status--wrapper { @apply p-0 shadow-none rounded-none; } diff --git a/src/styles/components/reply-mentions.scss b/src/styles/components/reply-mentions.scss index 002afe3e1..122f70874 100644 --- a/src/styles/components/reply-mentions.scss +++ b/src/styles/components/reply-mentions.scss @@ -7,7 +7,7 @@ } } -.status__wrapper { +.status--wrapper { .reply-mentions { display: block; diff --git a/src/styles/components/status.scss b/src/styles/components/status.scss index 3c7863062..660f5127e 100644 --- a/src/styles/components/status.scss +++ b/src/styles/components/status.scss @@ -15,7 +15,7 @@ } } -[column-type='filled'] .status__wrapper, +[column-type='filled'] .status--wrapper, [column-type='filled'] .status-placeholder { @apply bg-transparent dark:bg-transparent rounded-none shadow-none; } diff --git a/src/styles/tailwind.css b/src/styles/tailwind.css index 49e73944e..f801dc04b 100644 --- a/src/styles/tailwind.css +++ b/src/styles/tailwind.css @@ -3,6 +3,41 @@ @tailwind utilities; @layer utilities { + .thread { + @apply bg-white; + + .status--content-wrapper { + @apply pl-[54px] rtl:pl-0 rtl:pr-[54px]; + } + } + + .thread__status { + @apply relative pb-4; + + .status--wrapper { + @apply shadow-none p-0; + } + } + + .notification .status--wrapper { + @apply p-0 shadow-none rounded-none; + } + + .status--wrapper { + .reply-mentions { + display: block; + + span { + cursor: pointer; + } + } + } + + [column-type='filled'] .status--wrapper, + [column-type='filled'] .status-placeholder { + @apply bg-transparent dark:bg-transparent rounded-none shadow-none; + } + .search__icon { &::-moz-focus-inner { border: 0;