Skip to content

Commit 84c81fd

Browse files
authored
fix(chrome): improve custom Nav color contrast (#1642)
1 parent 5b9533b commit 84c81fd

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

packages/chrome/.size-snapshot.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
22
"index.esm.js": {
3-
"bundled": 55538,
4-
"minified": 42377,
5-
"gzipped": 9070,
3+
"bundled": 55534,
4+
"minified": 42373,
5+
"gzipped": 9077,
66
"treeshaked": {
77
"rollup": {
8-
"code": 31977,
8+
"code": 31973,
99
"import_statements": 762
1010
},
1111
"webpack": {
12-
"code": 35113
12+
"code": 35109
1313
}
1414
}
1515
},
1616
"index.cjs.js": {
17-
"bundled": 60683,
18-
"minified": 47256,
19-
"gzipped": 9438
17+
"bundled": 60679,
18+
"minified": 47252,
19+
"gzipped": 9445
2020
}
2121
}

packages/chrome/src/elements/nav/NavItem.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ describe('NavItem', () => {
143143

144144
expect(container.firstChild!.firstChild).toHaveStyleRule(
145145
'background-color',
146-
'rgba(255,255,255,0.3)'
146+
'rgba(255,255,255,0.4)'
147147
);
148148
});
149149

@@ -156,7 +156,7 @@ describe('NavItem', () => {
156156

157157
expect(container.firstChild!.firstChild).toHaveStyleRule(
158158
'background-color',
159-
'rgba(0,0,0,0.3)'
159+
'rgba(0,0,0,0.4)'
160160
);
161161
});
162162
});

packages/chrome/src/styled/nav/StyledNav.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const COMPONENT_ID = 'chrome.nav';
1313
const colorStyles = (props: IStyledNavProps) => {
1414
const shade = props.isDark || props.isLight ? 600 : 700;
1515
const backgroundColor = getColor(props.hue, shade, props.theme);
16-
const foregroundColor = props.isLight ? props.theme.palette.grey[800] : props.theme.palette.white;
16+
const foregroundColor = props.isLight ? props.theme.palette.black : props.theme.palette.white;
1717

1818
return css`
1919
background-color: ${backgroundColor};

packages/chrome/src/styled/nav/StyledNavItem.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ const colorStyles = (props: IStyledNavItemProps) => {
3333

3434
if (isCurrent) {
3535
if (isLight) {
36-
currentColor = rgba(DARK, 0.3);
36+
currentColor = rgba(DARK, 0.4);
3737
} else if (isDark) {
38-
currentColor = rgba(LIGHT, 0.3);
38+
currentColor = rgba(LIGHT, 0.4);
3939
} else {
4040
currentColor = getColor(hue, 500, theme);
4141
}

0 commit comments

Comments
 (0)