Skip to content

Commit 6448003

Browse files
authored
fix(Quick Reblog): restore AlreadyReblogged tick in new post footer variants (#1852)
1 parent 29cff07 commit 6448003

File tree

2 files changed

+58
-18
lines changed

2 files changed

+58
-18
lines changed

src/features/quick_reblog/index.css

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -185,20 +185,52 @@
185185

186186
#quick-reblog .action-buttons.community-selected button:not([data-state="published"]) { display: none; }
187187

188-
:is(.published, .queue, .draft) :is(a[role="button"], button[class=""]) {
188+
/* === AlreadyReblogged === */
189+
190+
footer.published :is(button:not([role]), a[href^="/reblog/"]) use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"]) { --icon-color-primary: rgb(var(--green)); }
191+
footer.queue :is(button:not([role]), a[href^="/reblog/"]) use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"]) { --icon-color-primary: rgb(var(--purple)); }
192+
footer.draft :is(button:not([role]), a[href^="/reblog/"]) use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"]) { --icon-color-primary: rgb(var(--red)); }
193+
194+
footer:is(.published, .queue, .draft) :is(button:not([role]), a[href^="/reblog/"]):has(use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"])) {
189195
position: relative;
190196
}
191197

192-
:is(.published, .queue, .draft) :is(a[role="button"], button[class=""])::after {
198+
/* Cut-out for tick in 2025 post footer, "split notes count" variant */
199+
footer:is(.published, .queue, .draft) a[href^="/reblog/"] svg:has(use[href="#managed-icon__ds-reblog-24"]) {
200+
-webkit-mask-image: radial-gradient(
201+
calc(14.7px / 2) calc(18px / 2) at bottom 5px right 4px,
202+
transparent 99%,
203+
white 100%
204+
);
205+
mask-image: radial-gradient(
206+
calc(14.7px / 2) calc(18px / 2) at bottom 5px right 4px,
207+
transparent 99%,
208+
white 100%
209+
);
210+
}
211+
212+
/* Cut-out for tick in 2025 post footer, "single action" variant */
213+
footer:is(.published, .queue, .draft) button svg:has(use[href="#managed-icon__ds-reblog-24"]) {
214+
-webkit-mask-image: radial-gradient(
215+
calc(14.7px / 2) calc(18px / 2) at bottom 4px left 21px,
216+
transparent 99%,
217+
white 100%
218+
);
219+
mask-image: radial-gradient(
220+
calc(14.7px / 2) calc(18px / 2) at bottom 4px left 21px,
221+
transparent 99%,
222+
white 100%
223+
);
224+
}
225+
226+
/* Styles for tick pseudo-element */
227+
footer:is(.published, .queue, .draft) :is(button:not([role]), a[href^="/reblog/"]):has(use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"]))::after {
193228
position: absolute;
194-
bottom: -2px;
195-
right: -4px;
196229

197230
display: inline-block;
198231
padding: 2px;
199232
border-radius: 100%;
200233

201-
background-color: rgb(var(--white));
202234
content: "\2713";
203235
font-family: "Favorit", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
204236
font-size: 14px;
@@ -207,18 +239,30 @@
207239
line-height: 1;
208240
}
209241

210-
@media (max-width: 989px) {
211-
:is(.published, .queue, .draft) :is(a[role="button"], button[class=""])::after {
212-
bottom: calc((27px / 2) - 2px);
213-
right: calc((27px / 2) - 4px);
214-
}
242+
/* Pre-2025 post footer */
243+
footer:is(.published, .queue, .draft) a[href^="/reblog/"]:has(use[href="#managed-icon__reblog"])::after {
244+
background-color: var(--content-panel);
245+
bottom: -5px;
246+
right: -5px;
247+
}
248+
249+
/* 2025 post footer, "split notes count" variant */
250+
footer:is(.published, .queue, .draft) a[href^="/reblog/"]:has(use[href="#managed-icon__ds-reblog-24"])::after {
251+
bottom: 4px;
252+
right: 5px;
253+
}
254+
255+
/* 2025 post footer, "single action" variant */
256+
footer:is(.published, .queue, .draft) button:has(use[href="#managed-icon__ds-reblog-24"])::after {
257+
bottom: 4px;
258+
left: 21px;
215259
}
216260

217-
.published :is(a[role="button"], button[class=""])::after { color: rgb(var(--green)); }
218-
.queue :is(a[role="button"], button[class=""])::after { color: rgb(var(--purple)); }
219-
.draft :is(a[role="button"], button[class=""])::after { color: rgb(var(--red)); }
261+
footer.published :is(button:not([role]), a[href^="/reblog/"]):has(use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"]))::after { color: rgb(var(--green)); }
262+
footer.queue :is(button:not([role]), a[href^="/reblog/"]):has(use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"]))::after { color: rgb(var(--purple)); }
263+
footer.draft :is(button:not([role]), a[href^="/reblog/"]):has(use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"]))::after { color: rgb(var(--red)); }
220264

221-
/* XKit 7 override */
265+
/* === XKit 7 override === */
222266

223267
#x1cpostage_box {
224268
display: none !important;

src/features/quick_reblog/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ ${keyToCss('engagementAction', 'targetWrapperFlex')}:has(> #quick-reblog) {
8383
${keyToCss('engagementAction', 'targetWrapperFlex')}:has(> #quick-reblog) ${keyToCss('tooltip')} {
8484
display: none;
8585
}
86-
87-
footer.published ${keyToCss('footerRow', 'footerContent')} svg use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"]) { --icon-color-primary: rgb(var(--green)); }
88-
footer.queue ${keyToCss('footerRow', 'footerContent')} svg use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"]) { --icon-color-primary: rgb(var(--purple)); }
89-
footer.draft ${keyToCss('footerRow', 'footerContent')} svg use:is([href="#managed-icon__ds-reblog-24"], [href="#managed-icon__reblog"]) { --icon-color-primary: rgb(var(--red)); }
9086
`);
9187

9288
const onBlogSelectorChange = () => {

0 commit comments

Comments
 (0)