Skip to content

Commit 6e0363f

Browse files
authored
feat: DC-4267 Add new badges + yellow color to theming (#7099)
* Add new badges + yellow color to theming * fix duplicate
1 parent f552368 commit 6e0363f

File tree

2 files changed

+96
-2
lines changed

2 files changed

+96
-2
lines changed

src/css/custom.css

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,8 +1152,61 @@ body:has(.navbar-sidebar--show) > div:first-of-type {
11521152
.mantine-Stack-root {
11531153
gap: 0;
11541154
}
1155+
.beta-badge, .feature-badge, .new-badge, .preview-badge, .early-access-badge {
1156+
position: relative;
1157+
}
1158+
.beta-badge::after {
1159+
position: absolute;
1160+
right: 0px;
1161+
font-size: 12px;
1162+
font-style: normal;
1163+
font-weight: 600;
1164+
color: var(--yellow-800);
1165+
background: var(--yellow-200);
1166+
line-height: 15px;
1167+
border-radius: 5px;
1168+
padding: 2px 5px;
1169+
text-transform: capitalize;
1170+
content: "Beta";
1171+
top: 50%;
1172+
transform: translateY(-50%);
1173+
}
11551174

1156-
.preview-badge ::after {
1175+
.feature-badge::after {
1176+
position: absolute;
1177+
right: 0px;
1178+
font-size: 12px;
1179+
font-style: normal;
1180+
font-weight: 600;
1181+
color: var(--surface-brand-darkest-indigo);
1182+
background: var(--surface-brand-light-indigo);
1183+
border-radius: 5px;
1184+
padding: 2px 5px;
1185+
text-transform: capitalize;
1186+
content: "Feature";
1187+
top: 50%;
1188+
transform: translateY(-50%);
1189+
line-height: 15px;
1190+
}
1191+
1192+
.new-badge::after {
1193+
position: absolute;
1194+
right: 0px;
1195+
font-size: 12px;
1196+
font-style: normal;
1197+
font-weight: 600;
1198+
color: var(--surface-brand-darkest);
1199+
background: var(--surface-brand-light);
1200+
border-radius: 5px;
1201+
padding: 2px 5px;
1202+
text-transform: capitalize;
1203+
line-height: 15px;
1204+
content: "New";
1205+
top: 50%;
1206+
transform: translateY(-50%);
1207+
}
1208+
1209+
.preview-badge::after {
11571210
position: absolute;
11581211
right: 0px;
11591212
font-size: 12px;
@@ -1164,10 +1217,13 @@ body:has(.navbar-sidebar--show) > div:first-of-type {
11641217
border-radius: 5px;
11651218
padding: 2px 5px;
11661219
text-transform: capitalize;
1220+
line-height: 15px;
11671221
content: "Preview";
1222+
top: 50%;
1223+
transform: translateY(-50%);
11681224
}
11691225

1170-
.early-access-badge ::after {
1226+
.early-access-badge::after {
11711227
position: absolute;
11721228
right: 0px;
11731229
font-size: 12px;
@@ -1176,9 +1232,12 @@ body:has(.navbar-sidebar--show) > div:first-of-type {
11761232
color: var(--badge-color);
11771233
background: var(--badge-bg-color);
11781234
border-radius: 5px;
1235+
line-height: 15px;
11791236
padding: 2px 5px;
11801237
text-transform: capitalize;
11811238
content: "Early Access";
1239+
top: 50%;
1240+
transform: translateY(-50%);
11821241
}
11831242

11841243
.table-of-contents__link--active.table-of-contents__link--active:hover code {

src/css/theming.css

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
--surface-brand-grey: #f7fafc;
6868
--surface-brand-grey-strong: #edf2f7;
6969
--surface-brand-light: #d9f9f6;
70+
--surface-brand-light-indigo: #EBF4FF;
71+
--surface-brand-darkest: #154F47;
72+
--surface-brand-darkest-indigo: #434190;
7073
--primary-font-color: var(--gray-800);
7174
--surface-primary: #ffffff;
7275
--disabled-font-color: #CBD5E0;
@@ -177,6 +180,16 @@
177180
--teal-700: #187367;
178181
--teal-800: #154f47;
179182
--teal-900: #154f47;
183+
184+
--yellow-100: #FFFFF0;
185+
--yellow-200: #FEFCBF;
186+
--yellow-300: #FAF089;
187+
--yellow-400: #F6E05E;
188+
--yellow-500: #ECC94B;
189+
--yellow-600: #D69E2E;
190+
--yellow-700: #B7791F;
191+
--yellow-800: #975A16;
192+
--yellow-900: #744210;
180193

181194
@media (max-width: 996px) {
182195
--ifm-menu-link-sublist-icon: url("/icons/chevron-up-solid.svg");
@@ -232,6 +245,9 @@ html[data-theme="dark"] {
232245
--surface-brand-grey: #161d2b;
233246
--surface-brand-grey-strong: #2d3748;
234247
--surface-brand-light: #0d3a38;
248+
--surface-brand-light-indigo: #282B6B;
249+
--surface-brand-darkest: #B7F4EE;
250+
--surface-brand-darkest-indigo: #C3DAFE;
235251
--secondary-font-color: rgb(203, 213, 224);
236252
--tertiary-font-color: #a0aec0;
237253
--ifm-dropdown-background-color: var(--gray-1000);
@@ -318,6 +334,9 @@ html[data-theme="dark"] {
318334
--surface-brand-grey: #f7fafc;
319335
--surface-brand-grey-strong: #edf2f7;
320336
--surface-brand-light: #d9f9f6;
337+
--surface-brand-light-indigo: #EBF4FF;
338+
--surface-brand-darkest: #154F47;
339+
--surface-brand-darkest-indigo: #434190;
321340
--ifm-color-primary-darkest: #205d3b;
322341
--ifm-color-primary-light: #33925d;
323342
--ifm-color-primary-lighter: #359962;
@@ -354,6 +373,9 @@ html[data-theme="dark"] {
354373
--surface-brand-grey: #f7fafc;
355374
--surface-brand-grey-strong: #edf2f7;
356375
--surface-brand-light: #d9f9f6;
376+
--surface-brand-light-indigo: #EBF4FF;
377+
--surface-brand-darkest: #154F47;
378+
--surface-brand-darkest-indigo: #434190;
357379
--secondary-font-color: #4a5568;
358380
--tertiary-font-color: #718096;
359381
--ifm-dropdown-background-color: #fff;
@@ -464,6 +486,16 @@ html[data-theme="dark"] {
464486
--teal-700: #187367;
465487
--teal-800: #154f47;
466488
--teal-900: #154f47;
489+
490+
--yellow-100: #FFFFF0;
491+
--yellow-200: #FEFCBF;
492+
--yellow-300: #FAF089;
493+
--yellow-400: #F6E05E;
494+
--yellow-500: #ECC94B;
495+
--yellow-600: #D69E2E;
496+
--yellow-700: #B7791F;
497+
--yellow-800: #975A16;
498+
--yellow-900: #744210;
467499
}
468500

469501
:root[data-theme="dark"] {
@@ -505,6 +537,9 @@ html[data-theme="dark"] {
505537
--surface-brand-grey: #161d2b;
506538
--surface-brand-grey-strong: #2d3748;
507539
--surface-brand-light: #0d3a38;
540+
--surface-brand-light-indigo: #282B6B;
541+
--surface-brand-darkest: #B7F4EE;
542+
--surface-brand-darkest-indigo: #C3DAFE;
508543
--secondary-font-color: rgb(203, 213, 224);
509544
--tertiary-font-color: #a0aec0;
510545
--ifm-dropdown-background-color: var(--gray-1000);

0 commit comments

Comments
 (0)