Skip to content

Commit 1fa108a

Browse files
committed
update Branded palette colours for Labs Section
1 parent 46d70db commit 1fa108a

File tree

1 file changed

+35
-70
lines changed

1 file changed

+35
-70
lines changed

dotcom-rendering/src/components/ContainerOverrides.tsx

Lines changed: 35 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const cardHeadlineLight: ContainerFunction = (
2828
return sourcePalette.neutral[93];
2929
case 'SpecialReportAltPalette':
3030
return sourcePalette.specialReportAlt[100];
31+
// TODO: @commercial-dev to update to neutral[7] when launching Redesigned Labs Containers
3132
case 'Branded':
3233
return sourcePalette.neutral[20];
3334
}
@@ -82,6 +83,7 @@ const cardTrailTextLight: ContainerFunction = (
8283
case 'SpecialReportAltPalette':
8384
return sourcePalette.specialReportAlt[100];
8485
case 'Branded':
86+
// TODO: @commercial-dev to update to palette('--card-trail-text') when launching Redesigned Labs Containers
8587
return sourcePalette.neutral[20];
8688
}
8789
};
@@ -108,6 +110,7 @@ const cardTrailTextDark: ContainerFunction = (
108110
case 'SpecialReportAltPalette':
109111
return sourcePalette.specialReportAlt[700];
110112
case 'Branded':
113+
// TODO: @commercial-dev to update to palette('--card-trail-text') when launching Redesigned Labs Containers
111114
return sourcePalette.neutral[86];
112115
}
113116
};
@@ -133,6 +136,7 @@ const cardKickerTextLight: ContainerFunction = (containerPalette) => {
133136
case 'SpecialReportAltPalette':
134137
return sourcePalette.specialReportAlt[100];
135138
case 'Branded':
139+
// TODO: @commercial-dev to update to labs[100] when launching Redesigned Labs Containers
136140
return sourcePalette.labs[200];
137141
}
138142
};
@@ -182,6 +186,7 @@ const cardQuoteIconLight: ContainerFunction = (containerPalette) => {
182186
case 'SpecialReportAltPalette':
183187
return sourcePalette.specialReportAlt[100];
184188
case 'Branded':
189+
// TODO: @commercial-dev to update to labs[100] when launching Redesigned Labs Containers
185190
return sourcePalette.labs[200];
186191
}
187192
};
@@ -330,7 +335,7 @@ const sectionToggleButtonLight: ContainerFunction = (containerPalette) => {
330335
case 'SpecialReportAltPalette':
331336
return sourcePalette.neutral[60];
332337
case 'Branded':
333-
return sourcePalette.neutral[7];
338+
return palette('--section-toggle-button');
334339
}
335340
};
336341
const sectionToggleButtonDark: ContainerFunction = (containerPalette) => {
@@ -354,7 +359,7 @@ const sectionToggleButtonDark: ContainerFunction = (containerPalette) => {
354359
case 'SpecialReportAltPalette':
355360
return sourcePalette.neutral[60];
356361
case 'Branded':
357-
return sourcePalette.neutral[7];
362+
return palette('--section-toggle-button');
358363
}
359364
};
360365
const sectionToggleButtonHoverLight: ContainerFunction = (containerPalette) => {
@@ -378,7 +383,7 @@ const sectionToggleButtonHoverLight: ContainerFunction = (containerPalette) => {
378383
case 'SpecialReportAltPalette':
379384
return sourcePalette.neutral[93];
380385
case 'Branded':
381-
return sourcePalette.neutral[20];
386+
return palette('--section-toggle-button-hover');
382387
}
383388
};
384389
const sectionToggleButtonHoverDark: ContainerFunction = (containerPalette) => {
@@ -527,9 +532,8 @@ const cardBackgroundLight: ContainerFunction = (containerPalette) => {
527532
return sourcePalette.neutral[7];
528533
case 'SpecialReportAltPalette':
529534
return sourcePalette.specialReportAlt[800];
530-
//TODO: Implement Branded properly when picking up the card ticket
531535
case 'Branded':
532-
return sourcePalette.neutral[93];
536+
return palette('--section-background');
533537
}
534538
};
535539

@@ -569,7 +573,6 @@ const cardMediaWaveformLight: ContainerFunction = (containerPalette) => {
569573
return sourcePalette.neutral[46];
570574
case 'LongRunningPalette':
571575
case 'EventPalette':
572-
case 'Branded':
573576
return sourcePalette.neutral[86];
574577
case 'LongRunningAltPalette':
575578
return sourcePalette.neutral[73];
@@ -579,6 +582,9 @@ const cardMediaWaveformLight: ContainerFunction = (containerPalette) => {
579582
return sourcePalette.culture[600];
580583
case 'SpecialReportAltPalette':
581584
return sourcePalette.specialReportAlt[800];
585+
case 'Branded':
586+
// TODO: @commercial-dev to update to palette('--card-media-waveform') when launching Redesigned Labs Containers
587+
return sourcePalette.neutral[86];
582588
}
583589
};
584590

@@ -590,14 +596,16 @@ const cardMediaWaveformDark: ContainerFunction = (containerPalette) => {
590596
case 'SombreAltPalette':
591597
case 'EventPalette':
592598
case 'SpecialReportAltPalette':
593-
case 'Branded':
594599
return sourcePalette.neutral[38];
595600
case 'LongRunningPalette':
596601
return sourcePalette.brand[400];
597602
case 'BreakingPalette':
598603
return sourcePalette.news[300];
599604
case 'EventAltPalette':
600605
return sourcePalette.culture[300];
606+
case 'Branded':
607+
// TODO: @commercial-dev to update to palette('--card-media-waveform') when launching Redesigned Labs Containers
608+
return sourcePalette.neutral[38];
601609
}
602610
};
603611

@@ -622,7 +630,7 @@ const sectionBackgroundLight: ContainerFunction = (containerPalette) => {
622630
case 'SpecialReportAltPalette':
623631
return sourcePalette.specialReportAlt[800];
624632
case 'Branded':
625-
return palette('--front-container-background');
633+
return palette('--section-background');
626634
}
627635
};
628636

@@ -646,14 +654,14 @@ const sectionBackgroundDark: ContainerFunction = (containerPalette) => {
646654
case 'SpecialReportAltPalette':
647655
return sourcePalette.specialReportAlt[100];
648656
case 'Branded':
649-
return palette('--front-container-background');
657+
return palette('--section-background');
650658
}
651659
};
652660

653661
const sectionBackgroundLeftLight: ContainerFunction = (containerPalette) => {
654662
switch (containerPalette) {
655663
case 'Branded':
656-
return sourcePalette.labs[400];
664+
return sourcePalette.labs[700];
657665
case 'InvestigationPalette':
658666
case 'LongRunningPalette':
659667
case 'SombrePalette':
@@ -704,6 +712,7 @@ const cardBorderSupportingLight: ContainerFunction = (containerPalette) => {
704712
case 'SpecialReportAltPalette':
705713
return transparentColour(sourcePalette.neutral[46], 0.3);
706714
case 'Branded':
715+
// TODO: @commercial-dev to update to palette('--card-border-supporting') when launching Redesigned Labs Containers
707716
return sourcePalette.neutral[73];
708717
}
709718
};
@@ -726,6 +735,7 @@ const cardBorderSupportingDark: ContainerFunction = (containerPalette) => {
726735
case 'SpecialReportAltPalette':
727736
return transparentColour(sourcePalette.neutral[46], 0.3);
728737
case 'Branded':
738+
// TODO: @commercial-dev to update to palette('--card-border-supporting') when launching Redesigned Labs Containers
729739
return sourcePalette.neutral[46];
730740
}
731741
};
@@ -793,7 +803,7 @@ const sectionDateLight: ContainerFunction = (containerPalette) => {
793803
case 'SpecialReportAltPalette':
794804
return sourcePalette.specialReportAlt[100];
795805
case 'Branded':
796-
return sourcePalette.neutral[100];
806+
return palette('--section-date');
797807
}
798808
};
799809

@@ -815,7 +825,7 @@ const sectionDateDark: ContainerFunction = (containerPalette) => {
815825
case 'SpecialReportAltPalette':
816826
return sourcePalette.specialReportAlt[700];
817827
case 'Branded':
818-
return sourcePalette.neutral[100];
828+
return palette('--section-date');
819829
}
820830
};
821831

@@ -841,7 +851,7 @@ const sectionTitleLight: ContainerFunction = (containerPalette) => {
841851
return sourcePalette.specialReportAlt[100];
842852
// Branded is expected to be used with LabsSection
843853
case 'Branded':
844-
return sourcePalette.neutral[0];
854+
return palette('--article-section-title');
845855
}
846856
};
847857

@@ -866,71 +876,26 @@ const sectionTitleDark: ContainerFunction = (containerPalette) => {
866876
case 'SpecialReportAltPalette':
867877
return sourcePalette.specialReportAlt[700];
868878
case 'Branded':
869-
return sourcePalette.neutral[97];
879+
return palette('--article-section-title');
870880
}
871881
};
872882

873-
const treatTextLight: ContainerFunction = (containerPalette) => {
874-
switch (containerPalette) {
875-
case 'Branded':
876-
return sourcePalette.neutral[46];
877-
case 'EventPalette':
878-
case 'SombreAltPalette':
879-
case 'EventAltPalette':
880-
case 'InvestigationPalette':
881-
case 'LongRunningAltPalette':
882-
case 'LongRunningPalette':
883-
case 'SombrePalette':
884-
case 'BreakingPalette':
885-
case 'SpecialReportAltPalette':
886-
return 'inherit';
887-
}
888-
};
889-
890-
const treatTextDark: ContainerFunction = (containerPalette) => {
891-
switch (containerPalette) {
892-
case 'Branded':
893-
return sourcePalette.neutral[38];
894-
case 'EventPalette':
895-
case 'SombreAltPalette':
896-
case 'EventAltPalette':
897-
case 'InvestigationPalette':
898-
case 'LongRunningAltPalette':
899-
case 'LongRunningPalette':
900-
case 'SombrePalette':
901-
case 'BreakingPalette':
902-
case 'SpecialReportAltPalette':
903-
return 'inherit';
904-
}
905-
};
906-
907-
const carouselDotLight: ContainerFunction = () => {
908-
return sourcePalette.brandAlt[400];
909-
};
883+
const treatTextLight: ContainerFunction = () => 'inherit';
884+
const treatTextDark: ContainerFunction = () => 'inherit';
910885

911-
const carouselDotDark: ContainerFunction = () => {
912-
return sourcePalette.brandAlt[400];
913-
};
886+
const carouselDotLight: ContainerFunction = () => sourcePalette.brandAlt[400];
887+
const carouselDotDark: ContainerFunction = () => sourcePalette.brandAlt[400];
914888

915-
const carouselActiveDotLight: ContainerFunction = () => {
916-
return sourcePalette.news[400];
917-
};
889+
const carouselActiveDotLight: ContainerFunction = () => sourcePalette.news[400];
890+
const carouselActiveDotDark: ContainerFunction = () => sourcePalette.news[400];
918891

919-
const carouselActiveDotDark: ContainerFunction = () => {
920-
return sourcePalette.news[400];
921-
};
892+
const carouselArrow: ContainerFunction = () => sourcePalette.neutral[7];
922893

923-
const carouselArrow: ContainerFunction = () => {
924-
return sourcePalette.neutral[7];
925-
};
894+
const carouselArrowBackground: ContainerFunction = () =>
895+
sourcePalette.brandAlt[400];
926896

927-
const carouselArrowBackground: ContainerFunction = () => {
928-
return sourcePalette.brandAlt[400];
929-
};
930-
931-
const carouselArrowBackgroundHover: ContainerFunction = () => {
932-
return sourcePalette.brandAlt[200];
933-
};
897+
const carouselArrowBackgroundHover: ContainerFunction = () =>
898+
sourcePalette.brandAlt[200];
934899

935900
const carouselChevronLight: ContainerFunction = (containerPalette) =>
936901
cardHeadlineLight(containerPalette);

0 commit comments

Comments
 (0)