Skip to content

Commit 29cc8b0

Browse files
3coinsPiyush Jain
andauthored
Updated button styles with accessible colors (jupyterlab#11321)
Co-authored-by: Piyush Jain <[email protected]>
1 parent 9d25bf6 commit 29cc8b0

File tree

2 files changed

+44
-13
lines changed

2 files changed

+44
-13
lines changed

packages/application/style/buttons.css

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,55 +17,67 @@ button {
1717
}
1818

1919
button:focus-visible {
20-
border: 1px solid var(--jp-brand-color1);
20+
border: 1px solid var(--md-blue-900);
2121
}
2222

2323
button.jp-mod-styled.jp-mod-accept {
24-
background: var(--md-blue-500);
24+
background: var(--md-blue-700);
2525
border: 0;
2626
color: white;
2727
}
2828

2929
button.jp-mod-styled.jp-mod-accept:hover {
30-
background: var(--md-blue-600);
30+
background: var(--md-blue-800);
3131
}
3232

3333
button.jp-mod-styled.jp-mod-accept:active {
34-
background: var(--md-blue-700);
34+
background: var(--md-blue-900);
35+
}
36+
37+
button.jp-mod-styled.jp-mod-accept:focus-visible {
38+
border: 1px solid var(--md-blue-900);
3539
}
3640

3741
button.jp-mod-styled.jp-mod-reject {
38-
background: var(--md-grey-500);
42+
background: var(--md-grey-600);
3943
border: 0;
4044
color: white;
4145
}
4246

4347
button.jp-mod-styled.jp-mod-reject:hover {
44-
background: var(--md-grey-600);
48+
background: var(--md-grey-700);
4549
}
4650

4751
button.jp-mod-styled.jp-mod-reject:active {
48-
background: var(--md-grey-700);
52+
background: var(--md-grey-800);
53+
}
54+
55+
button.jp-mod-styled.jp-mod-reject:focus-visible {
56+
border: 1px solid var(--md-grey-800);
4957
}
5058

5159
button.jp-mod-styled.jp-mod-warn {
52-
background: var(--jp-error-color1);
60+
background: var(--md-red-700);
5361
border: 0;
5462
color: white;
5563
}
5664

5765
button.jp-mod-styled.jp-mod-warn:hover {
58-
background: var(--md-red-600);
66+
background: var(--md-red-800);
5967
}
6068

6169
button.jp-mod-styled.jp-mod-warn:active {
62-
background: var(--md-red-700);
70+
background: var(--md-red-900);
71+
}
72+
73+
button.jp-mod-styled.jp-mod-warn:focus-visible {
74+
border: 1px solid var(--md-red-900);
6375
}
6476

6577
.jp-Button-flat {
6678
text-decoration: none;
6779
padding: var(--jp-flat-button-padding);
68-
color: var(--jp-warn-color1);
80+
color: var(--md-grey-600);
6981
font-weight: 500;
7082
background-color: transparent;
7183
height: var(--jp-private-running-shutdown-button-height);
@@ -75,11 +87,11 @@ button.jp-mod-styled.jp-mod-warn:active {
7587
}
7688

7789
.jp-Button-flat:hover {
78-
background-color: rgba(153, 153, 153, 0.1);
90+
background-color: var(--md-grey-700);
7991
}
8092

8193
.jp-Button-flat:focus {
8294
border: none;
8395
box-shadow: none;
84-
background-color: rgba(153, 153, 153, 0.2);
96+
background-color: var(--md-grey-800);
8597
}

packages/apputils/style/dialog.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,25 @@ button.jp-Dialog-button:focus::-moz-focus-inner {
5757
border: 0;
5858
}
5959

60+
button.jp-Dialog-button.jp-mod-styled.jp-mod-accept:focus,
61+
button.jp-Dialog-button.jp-mod-styled.jp-mod-warn:focus,
62+
button.jp-Dialog-button.jp-mod-styled.jp-mod-reject:focus {
63+
outline-offset: 4px;
64+
-moz-outline-radius: 0px;
65+
}
66+
67+
button.jp-Dialog-button.jp-mod-styled.jp-mod-accept:focus {
68+
outline: 1px solid var(--md-blue-700);
69+
}
70+
71+
button.jp-Dialog-button.jp-mod-styled.jp-mod-warn:focus {
72+
outline: 1px solid var(--md-red-600);
73+
}
74+
75+
button.jp-Dialog-button.jp-mod-styled.jp-mod-reject:focus {
76+
outline: 1px solid var(--md-grey-700);
77+
}
78+
6079
button.jp-Dialog-close-button {
6180
padding: 0;
6281
height: 100%;

0 commit comments

Comments
 (0)