Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/itchy-tomatoes-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@stackoverflow/stacks": patch
---

patch(badges): Add star icon for new user badges
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const variants = {
"success",
"featured",
],
users: ["admin", "moderator", "staff", "ai", "bot"],
users: ["admin", "moderator", "staff", "ai", "bot", "new"],
};

describe("badge", () => {
Expand Down
16 changes: 13 additions & 3 deletions packages/stacks-classic/lib/components/badge/badge.less
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,19 @@
--_ba-sq-bg: var(--purple-200);
--_ba-bc: var(--purple-400);
--_ba-gap: var(--su2); // 2px gap between icon and text
--_ba-before-h: calc(var(--su12) + var(--su2)); // 14px
--_ba-before-w: calc(var(--su12) + var(--su2)); // 14px
--_ba-before-icon: url("data:image/svg+xml;,%3Csvg width='14' height='14' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1m0 1.25a5.75 5.75 0 1 0 0 11.5 5.75 5.75 0 0 0 0-11.5m1 10.06H7V10.6h2zM8.14 4c1.78 0 2.77.96 2.77 2.5 0 1.79-2.1 2.2-2.1 3.25h-1.6c0-2 2-2.08 2-3.26 0-.54-.27-.96-1.02-.96-.7 0-1.03.46-1.1 1.23H5.4A2.75 2.75 0 0 1 8.13 4' fill='%23fff'/%3E%3C/svg%3E");
--_ba-before-h: calc(var(--su12) + var(--su4)); // 16px
--_ba-before-w: calc(var(--su12) + var(--su4)); // 16px
--_ba-before-icon: url("data:image/svg+xml;,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.25 7h7.28l-5.89 4.29.68 2.08-2.07-1.5-.04-.12-.33-1.04.88-.64 2.16-1.56h-3.76l-.34-1.04L10 4.94l-.82 2.53-.34 1.04H5.08l2.16 1.56.88.64-.33 1.04-.83 2.54 2.16-1.57.87-.64 5.12 3.72.78 2.41L10 13.93l-5.9 4.28 2.26-6.92L.46 7h7.29L10 .08z' /%3E%3C/svg%3E");

&.s-badge__sm {
--_ba-before-h: calc(var(--su12) + var(--su2)); // 14px
--_ba-before-w: calc(var(--su12) + var(--su2)); // 14px
}

&.s-badge__lg {
--_ba-before-h: calc(var(--su12) + var(--su6)); // 18px
--_ba-before-w: calc(var(--su12) + var(--su6)); // 18px
}

&:before {
height: var(--_ba-before-h);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const variants = {
"success",
"featured",
],
users: ["admin", "moderator", "staff", "ai", "bot"],
users: ["admin", "moderator", "staff", "ai", "bot", "new"],
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown