From caa8994d224fb51bab363349da71968f75ec5864 Mon Sep 17 00:00:00 2001 From: Sadegh Barati Date: Fri, 1 Dec 2023 06:03:53 +0330 Subject: [PATCH] docs: add `color-scheme` (#193) * docs: add `color-scheme` to doc this change will fix **Choose File** text color in input file * docs: fix `Nuxt` logo in light mode * docs: fix line number highlight --- apps/www/.vitepress/config.mts | 3 +++ apps/www/.vitepress/theme/styles/themes.css | 8 ++++++++ apps/www/src/content/docs/installation.md | 2 +- apps/www/src/content/docs/theming.md | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/apps/www/.vitepress/config.mts b/apps/www/.vitepress/config.mts index 11573b64..42998819 100644 --- a/apps/www/.vitepress/config.mts +++ b/apps/www/.vitepress/config.mts @@ -17,6 +17,9 @@ export default defineConfig({ ['link', { rel: 'apple-touch-icon', href: '/apple-touch-icon.png' }], ['link', { rel: 'manifest', href: '/site.webmanifest' }], + ['meta', { name: 'theme-color', media: '(prefers-color-scheme: light)', content: 'white' }], + ['meta', { name: 'theme-color', media: '(prefers-color-scheme: dark)', content: 'black' }], + ['meta', { name: 'creator', content: 'radix-vue' }], ['meta', { name: 'theme-color', content: '#41b883' }], ['meta', { name: 'og:type', content: 'website' }], diff --git a/apps/www/.vitepress/theme/styles/themes.css b/apps/www/.vitepress/theme/styles/themes.css index 1dc18cb9..49194d9c 100644 --- a/apps/www/.vitepress/theme/styles/themes.css +++ b/apps/www/.vitepress/theme/styles/themes.css @@ -1,3 +1,11 @@ +html { + color-scheme: light; +} + +html.dark { + color-scheme: dark; +} + .theme-zinc { --background: 0 0% 100%; --foreground: 240 10% 3.9%; diff --git a/apps/www/src/content/docs/installation.md b/apps/www/src/content/docs/installation.md index 13afcaf3..04a30608 100644 --- a/apps/www/src/content/docs/installation.md +++ b/apps/www/src/content/docs/installation.md @@ -22,7 +22,7 @@ description: How to install dependencies and structure your app. Nuxt - +

Nuxt

diff --git a/apps/www/src/content/docs/theming.md b/apps/www/src/content/docs/theming.md index f310fd2b..f4fcdd58 100644 --- a/apps/www/src/content/docs/theming.md +++ b/apps/www/src/content/docs/theming.md @@ -14,7 +14,7 @@ You can choose between using CSS variables or Tailwind CSS utility classes for t To use utility classes for theming set `tailwind.cssVariables` to `false` in your `components.json` file. -```json {8} title="components.json" +```json {7} title="components.json" { "style": "default", "tailwind": { @@ -39,7 +39,7 @@ To use utility classes for theming set `tailwind.cssVariables` to `false` in you To use CSS variables for theming set `tailwind.cssVariables` to `true` in your `components.json` file. -```json {8} title="components.json" +```json {7} title="components.json" { "style": "default", "tailwind": {