0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-15 17:24:47 +08:00
discourse/plugins/discourse-rewind/assets/stylesheets/common/post-received-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

131 lines
2.3 KiB
SCSS
Vendored

.--post-received-reactions {
margin-block: 1em;
.rewind-report-container {
align-items: center;
justify-content: space-between;
gap: 0.5em;
@media screen and (width <= 475px) {
gap: 0.125em;
}
}
.rewind-report-title {
border: none;
width: 100%;
text-align: center;
margin: 0 0 0 -1em;
}
.rewind-card {
flex-direction: row;
gap: 0.5em;
height: min-content;
perspective: 1000px;
will-change: transform;
transform-style: preserve-3d;
border-radius: var(--rewind-border-radius);
cursor: pointer;
animation-name: ambientMovement;
animation-duration: 4000ms;
animation-delay: calc(-4000ms * var(--rand));
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
z-index: 1;
color: var(--rewind-white);
border: none;
.emoji {
width: 30px;
height: 30px;
image-rendering: crisp-edges;
transform: scale(1);
}
}
.rewind-card__emoji {
font-size: 12px;
}
.scale:nth-child(1) {
padding: 0.25em;
transform: rotateZ(calc(var(--ambientAmount) * 12deg));
.emoji {
width: 20px;
height: 20px;
}
}
.scale:nth-child(2) {
padding: 0.35em;
transform: rotateZ(calc(var(--ambientAmount) * 11.2deg));
.emoji {
width: 22px;
height: 22px;
}
}
.scale:nth-child(3) {
transform: rotateZ(calc(var(--ambientAmount) * 10deg));
padding: 0.5em;
.emoji {
width: 24px;
height: 24px;
}
}
.scale:nth-child(4) {
transform: rotateZ(calc(var(--ambientAmount) * 8deg));
padding: 0.75em;
.emoji {
width: 26px;
height: 26px;
}
}
.scale:nth-child(5) {
transform: rotateZ(calc(var(--ambientAmount) * 13deg));
}
@media screen and (width <= 625px) {
.scale {
width: min-content;
}
.scale:nth-child(1) {
padding: 0.15em;
}
.scale:nth-child(2) {
padding: 0.25em;
}
.scale:nth-child(3) {
padding: 0.35em;
}
.scale:nth-child(4) {
padding: 0.45em;
}
.scale:nth-child(5) {
padding: 0.65em;
}
}
@media screen and (width <= 475px) {
.scale {
width: min-content;
padding: 0.2em;
}
.scale:nth-child(5) {
display: none;
}
}
}