Skip to content

Commit f46d390

Browse files
committed
wcag/contrast: improve contrast of next pages, file explorer, and notebooks
1 parent c05e1d2 commit f46d390

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

src/packages/frontend/app/antd-base-theme.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import { COLORS } from "@cocalc/util/theme";
1010
export function getBaseAntdTheme(): ThemeConfig {
1111
return {
1212
token: {
13-
colorLink: COLORS.BLUE_D,
13+
colorPrimary: COLORS.COCALC_BLUE,
14+
colorLink: COLORS.BLUE_DD,
15+
colorTextLightSolid: COLORS.TOP_BAR.ACTIVE,
1416
colorTextDescription: COLORS.GRAY_DD,
1517
},
1618
};

src/packages/frontend/app/context.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ export function useAntdStyleProvider() {
9292

9393
const animationStyle = animate ? undefined : { motion: false };
9494

95-
const brandedColors = branded
96-
? { colorPrimary: COLORS.COCALC_BLUE }
97-
: undefined;
95+
const primaryColor = branded
96+
? undefined
97+
: { colorPrimary: COLORS.ANTD_LINK_BLUE };
9898

9999
const algorithm = compact ? { algorithm: theme.compactAlgorithm } : undefined;
100100

@@ -103,13 +103,13 @@ export function useAntdStyleProvider() {
103103
...algorithm,
104104
token: {
105105
...(baseTheme.token ?? {}),
106-
...brandedColors,
106+
...primaryColor,
107107
...borderStyle,
108108
...animationStyle,
109109
},
110110
components: {
111111
Button: {
112-
...brandedColors,
112+
...primaryColor,
113113
},
114114
},
115115
};

src/packages/frontend/customize.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,6 @@ export const Footer: React.FC = React.memo(() => {
589589
const webappVersionInfo =
590590
`Version ${smc_version} @ ${build_date}` + ` | ${smc_git_rev.slice(0, 8)}`;
591591
const style: React.CSSProperties = {
592-
color: "gray",
593592
textAlign: "center",
594593
paddingBottom: `${UNIT}px`,
595594
};

src/packages/frontend/index.sass

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ ul.nav.pull-right.navbar-nav li
268268
z-index : 0
269269

270270
footer
271-
color : gray
271+
color : colors.$COL_GRAY_M
272272
a
273-
color : gray
273+
color : colors.$COL_GRAY_M
274274

275275
@keyframes pulse
276276
0%
@@ -421,4 +421,3 @@ span.cc-project-fixedtab-drag:hover
421421

422422
div.cc-project-flyout-file-item:hover
423423
background-color: colors.$COL_BLUE_LLLL
424-

src/packages/frontend/jupyter/status.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ import { ALERT_COLS } from "./usage";
3232
const KERNEL_NAME_STYLE: CSS = {
3333
margin: "0px 5px",
3434
display: "block",
35-
color: COLORS.BS_BLUE_TEXT,
35+
color: COLORS.BLUE_DD,
3636
whiteSpace: "nowrap",
3737
overflow: "hidden",
3838
textOverflow: "ellipsis",
3939
} as const;
4040

4141
const KERNEL_USAGE_STYLE: CSS = {
4242
margin: "0px 5px",
43-
color: COLORS.GRAY,
43+
color: COLORS.GRAY_M,
4444
borderRight: `1px solid ${COLORS.GRAY}`,
4545
paddingRight: "5px",
4646
display: "flex",
@@ -234,7 +234,7 @@ export function Kernel({
234234
<div
235235
style={{
236236
display: "flex",
237-
color: COLORS.GRAY,
237+
color: COLORS.GRAY_M,
238238
paddingLeft: "5px",
239239
borderLeft: "1px solid gray",
240240
}}
@@ -383,7 +383,7 @@ export function Kernel({
383383
<div
384384
style={{
385385
flex: 1,
386-
color: COLORS.GRAY,
386+
color: COLORS.GRAY_M,
387387
textAlign: "center",
388388
whiteSpace: "nowrap",
389389
overflow: "hidden",
@@ -692,7 +692,7 @@ export function Kernel({
692692
const body = (
693693
<div
694694
style={{
695-
color: COLORS.GRAY,
695+
color: COLORS.GRAY_M,
696696
cursor: "pointer",
697697
}}
698698
>

src/packages/frontend/project/explorer/action-bar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import * as misc from "@cocalc/util/misc";
1919
import { COLORS } from "@cocalc/util/theme";
2020

2121
const ROW_INFO_STYLE = {
22-
color: COLORS.GRAY,
22+
color: COLORS.TAB,
2323
height: "22px",
2424
margin: "5px 3px",
2525
} as const;

src/packages/frontend/project/explorer/file-listing/file-row.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const FileRow: React.FC<Props> = React.memo((props) => {
120120
return (
121121
<a style={styles} cocalc-test="file-line">
122122
{misc.trunc_middle(name, 50)}
123-
<span style={{ color: !props.mask ? COLORS.FILE_EXT : undefined }}>
123+
<span style={{ color: !props.mask ? COLORS.GRAY_M : undefined }}>
124124
{ext === "" ? "" : `.${ext}`}
125125
</span>
126126
{render_link_target()}
@@ -260,12 +260,12 @@ export const FileRow: React.FC<Props> = React.memo((props) => {
260260
return (
261261
<TimeAgo
262262
date={new Date(props.time * 1000).toISOString()}
263-
style={{ color: COLORS.GRAY_M }}
263+
style={{ color: COLORS.TAB }}
264264
/>
265265
);
266266
} catch (error) {
267267
return (
268-
<div style={{ color: COLORS.GRAY_M, display: "inline" }}>
268+
<div style={{ color: COLORS.TAB, display: "inline" }}>
269269
Invalid Date Time
270270
</div>
271271
);
@@ -280,7 +280,7 @@ export const FileRow: React.FC<Props> = React.memo((props) => {
280280
const ext_lower = ext.toLowerCase();
281281
const style: CSS = {
282282
marginLeft: "10px",
283-
color: COLORS.GRAY,
283+
color: COLORS.TAB,
284284
padding: 0,
285285
};
286286
const icon = <Icon name="eye" />;
@@ -341,10 +341,10 @@ export const FileRow: React.FC<Props> = React.memo((props) => {
341341
type="link"
342342
href={url}
343343
onClick={handle_download_click}
344-
style={{ color: COLORS.GRAY, padding: 0 }}
344+
style={{ color: COLORS.TAB, padding: 0 }}
345345
>
346346
{size}
347-
<Icon name="cloud-download" style={{ color: COLORS.GRAY }} />
347+
<Icon name="cloud-download" style={{ color: COLORS.TAB }} />
348348
</Button>
349349
</Popover>
350350
);
@@ -416,7 +416,7 @@ export const FileRow: React.FC<Props> = React.memo((props) => {
416416
<DirectorySize size={props.size} />
417417
</>
418418
) : (
419-
<span className="pull-right" style={{ color: COLORS.GRAY_M }}>
419+
<span className="pull-right" style={{ color: COLORS.TAB }}>
420420
{render_download_button(url)}
421421
{render_view_button(url, props.name)}
422422
</span>
@@ -427,7 +427,7 @@ export const FileRow: React.FC<Props> = React.memo((props) => {
427427
});
428428

429429
const directory_size_style: React.CSSProperties = {
430-
color: COLORS.GRAY,
430+
color: COLORS.TAB,
431431
marginRight: "3em",
432432
} as const;
433433

src/packages/frontend/project/explorer/file-listing/listing-header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const ListingHeader: React.FC<Props> = (props: Props) => {
4747
return sort_by(column_name);
4848
}}
4949
style={{
50-
color: COLORS.FG_BLUE,
50+
color: COLORS.BLUE_DD,
5151
fontWeight: "bold",
5252
whiteSpace: "nowrap",
5353
}}
@@ -80,7 +80,7 @@ export const ListingHeader: React.FC<Props> = (props: Props) => {
8080
"starred",
8181
<Icon
8282
name="star-filled"
83-
style={{ color: COLORS.FG_BLUE, fontSize: "12pt" }}
83+
style={{ color: COLORS.BLUE_DD, fontSize: "12pt" }}
8484
/>,
8585
"0px",
8686
)}

0 commit comments

Comments
 (0)