Skip to content

Commit b0db726

Browse files
Improve dark mode contrast (#1010)
* Dark mode contrast fix * Remove lightened text for strong in dark mode * Remove duplicate gray for dark mode tuning * Update modal css to match
1 parent 4e24e3f commit b0db726

33 files changed

+55
-54
lines changed

components/blocks/autofunction.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
}
3636

3737
:global(.dark) .Select {
38-
@apply bg-gray-100 text-white;
38+
@apply bg-gray-100 text-gray-40;
3939
}
4040

4141
:global(.old-version) .Select {

components/blocks/callout.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
}
2020

2121
:global(.dark) .Container p {
22-
@apply text-white !important;
22+
@apply text-gray-40 !important;
2323
}

components/blocks/cloud.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
}
1616

1717
:global(.dark) .Caption {
18-
@apply text-white;
18+
@apply text-gray-40;
1919
}

components/blocks/codeTile.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
:global(.dark) .Container section pre {
2424
@apply bg-gray-100;
25-
@apply text-white;
25+
@apply text-gray-40;
2626
}
2727

2828
.Container h1,

components/blocks/dataSourcesCard.module.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
:global(.dark) .Container h6,
3434
:global(.dark) .Container p,
3535
:global(.dark) .Container a {
36-
@apply text-white !important;
36+
@apply text-gray-40 !important;
3737
}
3838

3939
:global(.dark) .Container section div pre {
40-
@apply bg-gray-90 text-white;
40+
@apply bg-gray-90 text-gray-40;
4141
}
4242

4343
:global(.dark) .Container img {

components/blocks/iconHeader.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,5 @@
7777
}
7878

7979
:global(.dark) .IndigoText {
80-
@apply text-white !important;
80+
@apply text-gray-40 !important;
8181
}

components/blocks/image.module.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020

2121
:global(.dark) .Caption {
22-
@apply text-white;
22+
@apply text-gray-40;
2323
}
2424

2525
.LightBox {
@@ -44,5 +44,5 @@
4444
}
4545

4646
:global(.dark) .CloseButton {
47-
@apply bg-gray-90 text-white;
47+
@apply bg-gray-90 text-gray-40;
4848
}

components/blocks/inlineCallout.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818

1919
:global(.dark) .Text {
20-
@apply text-white !important;
20+
@apply text-gray-40 !important;
2121
}
2222

2323
:global(.dark) .Container {

components/blocks/newsEntry.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
:global(.dark) .Title,
3030
:global(.dark) .Text {
31-
@apply text-white !important;
31+
@apply text-gray-40 !important;
3232
}
3333

3434
.Text {

components/blocks/refCard.module.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353

5454
:global(.dark) .Container i {
55-
@apply text-white;
55+
@apply text-gray-40;
5656
}
5757

5858
:global(.dark) .Container h1,
@@ -63,11 +63,11 @@
6363
:global(.dark) .Container h6,
6464
:global(.dark) .Container p,
6565
:global(.dark) .Container a {
66-
@apply text-white;
66+
@apply text-gray-40;
6767
}
6868

6969
:global(.dark) .Container section div {
70-
@apply bg-gray-90 text-white;
70+
@apply bg-gray-90 text-gray-40;
7171
}
7272

7373
:global(.dark) .Container img {

components/blocks/table.module.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
}
2020

2121
:global(.dark) .HeadingRow {
22-
@apply bg-darkBlue-100/60 text-white;
22+
@apply bg-darkBlue-100/60 text-gray-40;
2323
}
2424

2525
:global(.dark) .Row td {
26-
@apply text-white;
26+
@apply text-gray-40;
2727
}
2828

2929
.Cell {

components/blocks/tile.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,5 @@
9292
:global(.dark) .TransparentBackground i,
9393
:global(.dark) .TransparentBackground h4,
9494
:global(.dark) .TransparentBackground p {
95-
@apply text-white !important;
95+
@apply text-gray-40 !important;
9696
}

components/blocks/youtube.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
}
1616

1717
:global(.dark) .Caption {
18-
@apply text-white;
18+
@apply text-gray-40;
1919
}

components/navigation/arrowLink.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const ArrowLink = ({ children, link, type, content, target }) => {
5151
width="14"
5252
height="14"
5353
viewBox="0 0 14 14"
54-
fill="text-gray-90 dark:text-white"
54+
fill="text-gray-90 dark:text-gray-40"
5555
xmlns="http://www.w3.org/2000/svg"
5656
className={`
5757
${styles.Icon}

components/navigation/arrowLink.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212

1313
:global(.dark) .Link {
14-
@apply text-white !important;
14+
@apply text-gray-40 !important;
1515
}
1616

1717
.NextLink {

components/navigation/footer.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424

2525
:global(.dark) .Link {
26-
@apply text-white !important;
26+
@apply text-gray-40 !important;
2727
}
2828

2929
.SocialNetworks {

components/navigation/header.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838

3939
:global(.dark) .LogoText {
40-
@apply text-white !important;
40+
@apply text-gray-40 !important;
4141
}
4242

4343
.NavigationContainer {

components/navigation/mobileNav.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
}
1313

1414
:global(.dark) .Icon {
15-
@apply text-white;
15+
@apply text-gray-40;
1616
}

components/navigation/navChild.module.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.Container {
2-
@apply text-sm tracking-tight dark:text-white mb-4;
2+
@apply text-sm tracking-tight dark:text-gray-40 mb-4;
33
}
44

55
.List {
@@ -29,7 +29,7 @@
2929
:global(.dark) .ExternalIcon,
3030
:global(.dark) .ActivePage,
3131
:global(.dark) .ActivePage ~ .Icon {
32-
@apply text-white !important;
32+
@apply text-gray-40 !important;
3333
}
3434

3535
.LinkContainer {
@@ -71,7 +71,7 @@
7171
}
7272

7373
:global(.dark) .PageName:not(.ActivePage) {
74-
@apply text-gray-40 !important;
74+
@apply text-gray-50 !important;
7575
}
7676

7777
.ActivePage {

components/navigation/navItem.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
}
5858

5959
:global(.dark) .CategoryName {
60-
@apply text-white !important;
60+
@apply text-gray-40 !important;
6161
}
6262

6363
.CondensedCategoryName {

components/utilities/download.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
}
55

66
:global(.dark) .Link {
7-
@apply text-white border-b-white !important;
7+
@apply text-gray-40 border-b-white !important;
88
}

components/utilities/floatingNav.module.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
}
3333

3434
.activeLink {
35-
@apply text-gray-90 !important;
35+
@apply text-gray-100 !important;
3636
}
3737

3838
:global(.dark) .activeLink {
39-
@apply text-white !important;
39+
@apply text-gray-40 !important;
4040
}
4141

4242
/* Paddings for different title hierarchies */

components/utilities/gdpr.module.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@
2525

2626
:global(.dark) .Markdown p,
2727
:global(.dark) .Markdown p a {
28-
@apply text-gray-20;
28+
@apply text-gray-40;
2929
}
3030

3131
:global(.dark) .Link,
3232
:global(.dark) .Button {
33-
@apply text-gray-20;
33+
@apply text-gray-40;
3434
}
3535

3636
:global(.dark) .Button {
3737
@apply border-gray-80;
3838
}
3939

4040
:global(.dark) .Markdown h1 {
41-
@apply text-white;
41+
@apply text-gray-40;
4242
}

components/utilities/headerLink.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ h1.HeaderContainer {
2727
:global(.dark) .HeaderContainer,
2828
:global(.dark) .CopiedMessage,
2929
:global(.dark) .CopiedIcon {
30-
@apply text-white !important;
30+
@apply text-gray-40 !important;
3131
}
3232

3333
.CopyLink {

components/utilities/helpful.module.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@
7070
:global(.dark) .ImproveTitle,
7171
:global(.dark) .ImproveText,
7272
:global(.dark) .Label {
73-
@apply text-white !important;
73+
@apply text-gray-40 !important;
7474
}
7575

7676
:global(.dark) .Button {
7777
@apply bg-gray-80;
78-
@apply text-white !important;
78+
@apply text-gray-40 !important;
7979
}
8080

8181
:global(.dark) .Icon {

components/utilities/psa.module.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313

1414
:global(.dark) .Icon {
15-
@apply text-white !important;
15+
@apply text-gray-40 !important;
1616
}
1717

1818
.Title {
@@ -23,7 +23,7 @@
2323
:global(.dark) .Title,
2424
:global(.dark) .Text,
2525
:global(.dark) .Link {
26-
@apply text-white !important;
26+
@apply text-gray-40 !important;
2727
}
2828

2929
.Text {

components/utilities/search.module.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222

2323
:global(.dark) .SearchBar {
24-
@apply text-white bg-gray-90 !important;
24+
@apply text-gray-40 bg-gray-90 !important;
2525
}
2626

2727
.SearchIcon {
@@ -42,7 +42,7 @@
4242
:global(.dark) .HotKey,
4343
:global(.dark) .SearchText,
4444
:global(.dark) .SearchIcon {
45-
@apply text-white !important;
45+
@apply text-gray-40 !important;
4646
}
4747

4848
/* Hits */
@@ -94,5 +94,5 @@
9494
}
9595

9696
:global(.dark) .HitTitle {
97-
@apply text-white !important;
97+
@apply text-gray-40 !important;
9898
}

components/utilities/searchModal.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.ais-InstantSearch .ais-SearchBox-form input {
10-
@apply h-16 w-full bg-gray-10 dark:bg-gray-90 border-b border-b-gray-40 text-gray-90 rounded-none pl-20 pr-4 text-base focus:outline-none focus:border-b-2 focus:border-b-yellow-90 dark:border-b-gray-80 dark:text-white;
10+
@apply h-16 w-full bg-gray-10 dark:bg-gray-90 border-b border-b-gray-40 text-gray-90 rounded-none pl-20 pr-4 text-base focus:outline-none focus:border-b-2 focus:border-b-yellow-90 dark:border-b-gray-80 dark:text-gray-40;
1111
}
1212

1313
.ais-InstantSearch .ais-SearchBox-form #search-clear,

components/utilities/socialCallout.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
:global(.dark) .Title,
77
:global(.dark) .Subtitle,
88
:global(.dark) .Text {
9-
@apply text-white !important;
9+
@apply text-gray-40 !important;
1010
}
1111

1212
.ListContainer {

components/utilities/themeToggle.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818

1919
:global(.dark) .Icon {
20-
@apply text-white !important;
20+
@apply text-gray-40 !important;
2121
}
2222

2323
.DarkIcon {

styles/lists.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Styles for nested lists inside markdown */
22
ol,
33
ul {
4-
@apply my-0 mx-6 p-0 mt-4 text-gray-90 dark:text-white;
4+
@apply my-0 mx-6 p-0 mt-4 text-gray-90 dark:text-gray-40;
55
}
66

77
ol li,

styles/tables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#content-container table:not(.full-width) tr th,
77
#content-container table:not(.full-width) tr td {
8-
@apply border-t border-t-gray-20 py-3 text-xs leading-loose tracking-normal text-gray-90 dark:text-white;
8+
@apply border-t border-t-gray-20 py-3 text-xs leading-loose tracking-normal text-gray-90 dark:text-gray-40;
99
}
1010

1111
#content-container table:not(.full-width) tr th a,

0 commit comments

Comments
 (0)