Skip to content

Commit

Permalink
feat: make dark mode default theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Elue-dev committed Oct 5, 2024
1 parent 72933fe commit 969ca45
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
6 changes: 6 additions & 0 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ const config: Config = {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},

colorMode: {
defaultMode: "dark",
disableSwitch: false,
respectPrefersColorScheme: false,
},
} satisfies Preset.ThemeConfig,
};

Expand Down
32 changes: 15 additions & 17 deletions docs/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,25 @@
* work well for content-centric websites.
*/

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-color-primary: #007bff;
--ifm-color-primary-dark: #0056b3;
--ifm-color-primary-darker: #004085;
--ifm-color-primary-darkest: #003366;
--ifm-color-primary-light: #66b3ff;
--ifm-color-primary-lighter: #99ccff;
--ifm-color-primary-lightest: #cce0ff;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
[data-theme="dark"] {
--ifm-color-primary: #00aaff;
--ifm-color-primary-dark: #0088cc;
--ifm-color-primary-darker: #0077aa;
--ifm-color-primary-darkest: #006699;
--ifm-color-primary-light: #66ccff;
--ifm-color-primary-lighter: #99ccff;
--ifm-color-primary-lightest: #cceeff;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

0 comments on commit 969ca45

Please sign in to comment.