Skip to content

Commit b5f0f06

Browse files
committed
💄(frontend) desaturate images system for generic theme
We want to desaturate the images system in the generic theme to make them less colorful and more in line with the overall theme. We added a special class to the images that need to be desaturated. Other property then desaturated can be apply depending on the theme.
1 parent 36b0ff9 commit b5f0f06

File tree

11 files changed

+20
-0
lines changed

11 files changed

+20
-0
lines changed

src/frontend/apps/impress/cunningham.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ tokens.themes.default.components = {
5959
'la-gaufre': false,
6060
'home-proconnect': false,
6161
beta: false,
62+
'image-system-filter': '',
6263
},
6364
};
6465

@@ -228,6 +229,7 @@ const genericTheme = {
228229
},
229230
},
230231
},
232+
'image-system-filter': 'saturate(0.2)',
231233
},
232234
},
233235
};

src/frontend/apps/impress/src/cunningham/cunningham-style.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@
4444
padding: 4px 6px;
4545
}
4646

47+
/**
48+
* Image System
49+
*/
50+
.c__image-system-filter {
51+
filter: var(--c--components--image-system-filter);
52+
}
53+
4754
@font-face {
4855
font-family: Inter;
4956
font-style: italic;

src/frontend/apps/impress/src/cunningham/cunningham-tokens.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@
490490
--c--components--la-gaufre: false;
491491
--c--components--home-proconnect: false;
492492
--c--components--beta: false;
493+
--c--components--image-system-filter: ;
493494
}
494495

495496
.cunningham-theme--dark {
@@ -687,6 +688,7 @@
687688
--c--components--button--primary--background--color-focus: var(
688689
--c--theme--colors--primary-focus
689690
);
691+
--c--components--image-system-filter: saturate(0.2);
690692
}
691693

692694
.clr-secondary-text {

src/frontend/apps/impress/src/cunningham/cunningham-tokens.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ export const tokens = {
366366
'la-gaufre': false,
367367
'home-proconnect': false,
368368
beta: false,
369+
'image-system-filter': '',
369370
},
370371
},
371372
dark: {
@@ -576,6 +577,7 @@ export const tokens = {
576577
},
577578
},
578579
},
580+
'image-system-filter': 'saturate(0.2)',
579581
},
580582
},
581583
},

src/frontend/apps/impress/src/features/docs/doc-search/components/DocSearchModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const DocSearchModal = ({ ...modalProps }: DocSearchModalProps) => {
8787
$justify="center"
8888
>
8989
<Image
90+
className="c__image-system-filter"
9091
width={320}
9192
src={EmptySearchIcon}
9293
alt={t('No active search')}

src/frontend/apps/impress/src/features/footer/Footer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export const Footer = () => {
7878
>
7979
{logo?.src && (
8080
<Image
81+
className="c__image-system-filter"
8182
priority
8283
src={logo.src}
8384
alt={logo?.alt || t('Logo')}

src/frontend/apps/impress/src/features/home/components/HomeBanner.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export default function HomeBanner() {
8888
</Box>
8989
{!isMobile && (
9090
<Image
91+
className="c__image-system-filter"
9192
src={banner}
9293
alt={t('Banner image')}
9394
priority

src/frontend/apps/impress/src/features/home/components/HomeSection.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export const HomeSection = ({
174174

175175
{illustration && (isSmallDevice || !video) && (
176176
<Image
177+
className="c__image-system-filter"
177178
src={illustration}
178179
alt={t('Illustration')}
179180
style={{

src/frontend/apps/impress/src/pages/401.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const Page: NextPageWithLayout = () => {
2929
$padding={{ bottom: '2rem' }}
3030
>
3131
<Image
32+
className="c__image-system-filter"
3233
src={img401}
3334
alt={t('Image 401')}
3435
style={{

src/frontend/apps/impress/src/pages/403.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const Page: NextPageWithLayout = () => {
2424
$padding={{ bottom: '2rem' }}
2525
>
2626
<Image
27+
className="c__image-system-filter"
2728
src={img403}
2829
alt={t('Image 403')}
2930
style={{

0 commit comments

Comments
 (0)