mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
Various style fixes for the modernized foundation upcoming change. Also noticed we have some unused button classes in the review queue in general. Before/After <img width="700" alt="image" src="https://github.com/user-attachments/assets/547c49ee-5d7c-42e5-be60-de06218b3329" /> <img width="700" alt="image" src="https://github.com/user-attachments/assets/54f5e698-00db-4855-86e0-74053c49408a" /> Before/After <img width="350" alt="image" src="https://github.com/user-attachments/assets/24881ca3-d10b-40e4-b6a6-b55eb507642f" /> <img width="350" alt="image" src="https://github.com/user-attachments/assets/320aaa5b-6493-4bc0-bd72-8c1f4391134b" /> Before/After: <img width="800" alt="image" src="https://github.com/user-attachments/assets/5b719e1e-24d5-434d-a370-de2477d13219" /> <img width="800" alt="image" src="https://github.com/user-attachments/assets/de39de34-c393-4ee1-b560-70622b2dd245" /> Before/After: <img width="333" alt="image" src="https://github.com/user-attachments/assets/b87107bd-1484-4716-96f1-b8a227a5d59f" /> <img width="220" alt="image" src="https://github.com/user-attachments/assets/8123f817-4b21-453b-bfb7-e934cd2d5e99" />
153 lines
2.9 KiB
SCSS
Vendored
153 lines
2.9 KiB
SCSS
Vendored
@use "sass:math";
|
|
@use "lib/viewport";
|
|
|
|
@keyframes solved-confetti-burst {
|
|
0% {
|
|
transform: translate(-50%, -50%) rotate(0deg);
|
|
opacity: 1;
|
|
}
|
|
|
|
100% {
|
|
transform: translate(
|
|
calc(-50% + cos(var(--angle)) * var(--distance)),
|
|
calc(-50% + sin(var(--angle)) * var(--distance) + 50px)
|
|
)
|
|
rotate(var(--rotation));
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
.solved-confetti {
|
|
position: fixed;
|
|
top: 200px;
|
|
right: 200px;
|
|
width: 0;
|
|
height: 0;
|
|
z-index: z("header") + 1;
|
|
overflow: visible;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.solved-confetti-particle {
|
|
position: absolute;
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 2px;
|
|
animation: solved-confetti-burst 1.5s ease-out forwards;
|
|
|
|
@for $i from 1 through 50 {
|
|
&:nth-child(#{$i}) {
|
|
--angle: #{math.random(360)}deg;
|
|
--distance: #{80 + math.random(150)}px;
|
|
--rotation: #{math.random(720) - 360}deg;
|
|
--delay: #{math.random(250) * 0.001}s;
|
|
--color: #{hsl(math.random(360), 80%, 60%)};
|
|
background-color: var(--color);
|
|
animation-delay: var(--delay);
|
|
}
|
|
}
|
|
}
|
|
|
|
$solved-color: var(--success);
|
|
|
|
.select-kit {
|
|
&.solved-status-filter {
|
|
min-width: auto;
|
|
margin-right: 0.5em;
|
|
|
|
.select-kit-header {
|
|
color: var(--primary-high);
|
|
}
|
|
|
|
.angle-icon {
|
|
color: currentcolor;
|
|
}
|
|
}
|
|
}
|
|
|
|
.fa.accepted {
|
|
color: $solved-color;
|
|
}
|
|
|
|
.post-controls .extra-buttons {
|
|
// anon text
|
|
.accepted-text {
|
|
white-space: nowrap;
|
|
|
|
.d-icon,
|
|
.accepted-label {
|
|
color: $solved-color;
|
|
}
|
|
}
|
|
|
|
// logged in button
|
|
.accepted {
|
|
.d-icon,
|
|
.d-button-label {
|
|
color: $solved-color;
|
|
}
|
|
}
|
|
}
|
|
|
|
.post-controls span.accepted-text {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.25em;
|
|
padding: 0 0.5rem;
|
|
font-size: var(--font-up-1);
|
|
height: 100%;
|
|
}
|
|
|
|
.user-card-metadata-outlet.accepted-answers {
|
|
display: inline-block;
|
|
}
|
|
|
|
.post-action-menu__solved-accepted-tooltip-content
|
|
.fk-d-tooltip__inner-content {
|
|
display: block;
|
|
}
|
|
|
|
.topic-statuses .topic-status.--solved {
|
|
.d-icon {
|
|
color: $solved-color;
|
|
}
|
|
}
|
|
|
|
.accepted-answers {
|
|
&.d-post-accordion {
|
|
--d-post-accordion-header-color: var(--secondary);
|
|
--d-post-accordion-header-background: #{$solved-color};
|
|
--d-post-accordion-header-border-color: #{$solved-color};
|
|
padding-bottom: var(--space-4);
|
|
|
|
@include viewport.from(sm) {
|
|
padding: var(--space-1) var(--topic-body-width-padding) var(--space-4)
|
|
var(--topic-body-width-padding);
|
|
}
|
|
}
|
|
|
|
&__title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
margin: 0;
|
|
text-transform: uppercase;
|
|
font-weight: normal;
|
|
}
|
|
|
|
&__solution-count {
|
|
font-size: var(--font-down-1);
|
|
}
|
|
}
|
|
|
|
.solved-shared-issue-row {
|
|
@include viewport.from(sm) {
|
|
padding-left: var(--topic-body-width-padding);
|
|
}
|
|
}
|
|
|
|
.solved-shared-issue-row .post-action-menu__solved-shared-issue {
|
|
&.has-shared-issue {
|
|
--d-button-default-icon-color: var(--tertiary);
|
|
}
|
|
}
|