0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 18:47:00 +08:00
discourse/plugins/discourse-rewind/assets/stylesheets/common/post-used-reactions.scss
Kris 07c7ce3989
UX: minor style adjustments for rewind on mobile (#36633)
Some minor adjustments for small screen based on user feedback

Emoji misalignment seen as a mistake rather than intentional, don't care
enough to keep it!

Before:
<img width="568" height="304" alt="image"
src="https://github.com/user-attachments/assets/37c65a4c-b45f-4af4-9b57-9ac789dbab6f"
/>


After:
<img width="568" height="248" alt="image"
src="https://github.com/user-attachments/assets/6886fb58-be97-49fc-aff8-8c3ba5849a80"
/>

On smaller screens, the header tab style looks like a mistake rather
than intentional when the name is this long... so I just switch the
style for smaller screens to avoid it


Before:
<img width="1070" height="1040" alt="image"
src="https://github.com/user-attachments/assets/32b3ac27-2ada-477a-9be3-37c8dc47815d"
/>


After:
<img width="1068" height="1060" alt="image"
src="https://github.com/user-attachments/assets/e4db8297-7d41-47e7-8f6f-804fdc03657c"
/>
2025-12-11 10:28:27 -05:00

118 lines
2.3 KiB
SCSS
Vendored

.--post-used-reactions {
.rewind-card {
@include rewind-border;
border-radius: 0 var(--rewind-border-radius) var(--rewind-border-radius)
var(--rewind-border-radius);
}
.rewind-reactions-chart {
display: flex;
flex-direction: column;
width: 100%;
}
@media screen and (width <= 600px) {
.rewind-report-title {
width: 100%;
box-sizing: border-box;
border-radius: var(--rewind-border-radius) var(--rewind-border-radius) 0 0;
padding-top: var(--space-4);
}
.rewind-card {
border-radius: 0 0 var(--rewind-border-radius) var(--rewind-border-radius);
padding-top: 0;
}
}
.rewind-reactions-row {
display: grid;
grid-template-columns: 25px 50px 1fr;
gap: 1em;
padding: 1em 0;
img.emoji {
vertical-align: baseline;
image-rendering: crisp-edges;
transform: scale(1);
}
&:nth-child(2) {
.rewind-reactions-bar {
animation-delay: 0.25s;
}
}
&:nth-child(3) {
.rewind-reactions-bar {
animation-delay: -0.25s;
}
}
&:nth-child(4) {
.rewind-reactions-bar {
animation-delay: 0.5s;
}
}
&:nth-child(5) {
.rewind-reactions-bar {
animation-delay: -0.5s;
}
}
}
.emoji {
height: 25px;
width: 25px;
padding-top: 2px;
}
.percentage {
font-weight: normal;
font-display: var(--pixel-text);
font-size: 16px;
color: var(--rewind-white);
padding-top: 0.35em;
}
.rewind-reactions-bar {
background: var(--rewind-white);
height: 25px;
background-size: 50px 50px;
border-radius: 3px;
background-image: linear-gradient(
-45deg,
var(--rewind-black) 12.5%,
var(--rewind-white) 12.5%,
var(--rewind-white) 50%,
var(--rewind-black) 50%,
var(--rewind-black) 62.5%,
var(--rewind-white) 62.5%
);
border: 4px solid var(--rewind-black);
box-shadow: 0 0 0 4px var(--rewind-white);
@media (prefers-reduced-motion: no-preference) {
animation: anim 5s linear infinite;
}
}
@keyframes anim {
0% {
background-position: 0 0;
}
100% {
background-position: 25px 25px;
}
}
.rewind-total-reactions {
font-size: 12px;
font-weight: normal;
margin-top: 1em;
color: var(--rewind-green);
text-align: start;
}
}