Skip to content

Commit 57eae42

Browse files
authored
fix: fixing dark mode background on the CTA button (#3882)
# Description As usual I got a little bit carried away, but the whole point was to just remove the white background in the CTA box with dark mode. Ended up making some other color changes. ## Problem\* A picture worth a thousand words: ![Screenshot 2023-12-19 at 18 01 19](https://github.com/noir-lang/noir/assets/20129824/3fd2938b-6d26-4d98-bab5-6bbc642306c5) ## Summary\* - Fixes the CTA box - Changes primary colors to match Aztec's color sheet, not much since we're gonna have a restyling later on anyway - Makes docs respect system theme instead of defaulting to white
1 parent 13834d4 commit 57eae42

2 files changed

Lines changed: 33 additions & 21 deletions

File tree

docs/docusaurus.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-var-requires */
12
import type { Config } from '@docusaurus/types';
23

34
const { themes } = require('prism-react-renderer');
@@ -47,6 +48,9 @@ export default {
4748
],
4849

4950
themeConfig: {
51+
colorMode: {
52+
respectPrefersColorScheme: true,
53+
},
5054
navbar: {
5155
logo: {
5256
alt: 'Noir Logo',

docs/src/css/custom.css

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,47 @@
66

77
/* You can override the default Infima variables here. */
88
:root {
9-
--ifm-color-primary: #9f3fff;
10-
--ifm-color-primary-dark: #2f1f49;
11-
--ifm-color-primary-darker: #2f1f49;
12-
--ifm-color-primary-darkest: #2f1f49;
13-
--ifm-color-primary-light: #9f3fff;
14-
--ifm-color-primary-lighter: #9f3fff;
15-
--ifm-color-primary-lightest: #9f3fff;
9+
--ifm-color-primary: #514167;
10+
--ifm-color-primary-dark: #493a5d;
11+
--ifm-color-primary-darker: #453758;
12+
--ifm-color-primary-darkest: #392d48;
13+
--ifm-color-primary-light: #594871;
14+
--ifm-color-primary-lighter: #5d4b76;
15+
--ifm-color-primary-lightest: #695486;
1616
--search-local-highlight-color: #2f1f49;
1717
--ifm-menu-color-background-active: #f6f8fa;
1818
--ifm-code-font-size: 95%;
19-
--ifm-breadcrumb-color-active: white;
20-
--ifm-breadcrumb-item-background-active: #2f1f49;
19+
--ifm-breadcrumb-color-active: #F6FBFC;
20+
--ifm-breadcrumb-item-background-active: #2f1f49;
2121
--ifm-heading-color: #2f1f49;
2222
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
23+
--ifm-link-color: #B68BE4;
2324
}
2425

2526
/* For readability concerns, you should choose a lighter palette in dark mode. */
2627
[data-theme='dark'] {
27-
--ifm-color-primary: #f5bda9;
28-
--ifm-color-primary-dark: #f5bda9;
29-
--ifm-color-primary-darker: #f5bda9;
30-
--ifm-color-primary-darkest: #f5bda9;
31-
--ifm-color-primary-light: #f5bda9;
32-
--ifm-color-primary-lighter: #f5bda9;
33-
--ifm-color-primary-lightest: #f5bda9;
34-
35-
--ifm-heading-color: white;
28+
--ifm-color-primary: #fbc0b4;
29+
--ifm-color-primary-dark: #f99e8b;
30+
--ifm-color-primary-darker: #f88c77;
31+
--ifm-color-primary-darkest: #f45939;
32+
--ifm-color-primary-light: #fde2dd;
33+
--ifm-color-primary-lighter: #fef4f1;
34+
--ifm-color-primary-lightest: #ffffff;
35+
36+
--ifm-heading-color: #F6FBFC;
3637
--ifm-menu-color-background-active: #282a36;
3738
--ifm-breadcrumb-color-active: #2f1f49;
3839
--ifm-breadcrumb-item-background-active: #f5bda9;
3940

4041
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
42+
--ifm-link-color: var(--ifm-color-primary);
4143
}
4244

4345
html[data-theme='dark'] {
4446
--search-local-highlight-color: #f5bda9;
45-
--search-local-muted-color: white;
47+
--search-local-muted-color: #F6FBFC;
4648
--search-local-hit-active-color: #1b1b1d;
47-
--search-local-hit-color: white;
49+
--search-local-hit-color: #F6FBFC;
4850
}
4951

5052
[data-theme='dark'] .footer {
@@ -65,6 +67,13 @@ html[data-theme='dark'] {
6567
--ifm-footer-title-color: #2f1f49;
6668
}
6769

70+
[data-theme='light'] #__docusaurus {
71+
background-color: #F6FBFC;
72+
}
73+
[data-theme='dark'] #__docusaurus {
74+
background-color: #161717;
75+
}
76+
6877
.katex-html {
6978
display: none;
7079
}
@@ -91,7 +100,6 @@ html[data-theme='dark'] {
91100
justify-content: center;
92101
margin: 0 auto;
93102
text-align: center;
94-
background: white;
95103
border: none;
96104
width: 50%;
97105
}

0 commit comments

Comments
 (0)