Skip to content

fix: improve tutorial dark mode contrast#1978

Open
Sean-Kenneth-Doherty wants to merge 1 commit into
sveltejs:mainfrom
Sean-Kenneth-Doherty:codex/tutorial-dark-mode
Open

fix: improve tutorial dark mode contrast#1978
Sean-Kenneth-Doherty wants to merge 1 commit into
sveltejs:mainfrom
Sean-Kenneth-Doherty:codex/tutorial-dark-mode

Conversation

@Sean-Kenneth-Doherty
Copy link
Copy Markdown

Summary

Partially addresses #627 by cleaning up two dark-mode contrast issues in tutorial examples.

  • make the unresolved $env/static/public preview use the tutorial foreground/background CSS variables instead of hard-coded white/black
  • make the raw-state SVG labels inherit the current foreground color in both unresolved and resolved examples
  • keep the tutorial instructions aligned with the new unresolved fallback values

I left the kitten image/background item out of this PR because that needs asset/background cleanup rather than a simple contrast fix.

Validation

  • SHARP_IGNORE_GLOBAL_LIBVIPS=1 mise exec node@24.15.0 -- pnpm install --frozen-lockfile
  • mise exec node@24.15.0 -- pnpm prettier --write <changed files>
  • mise exec node@24.15.0 -- pnpm --filter svelte.dev exec node --input-type=module -e "compile changed Svelte files"
  • git diff --check
  • mise exec node@24.15.0 -- pnpm --filter svelte.dev lint
  • mise exec node@24.15.0 -- pnpm --filter svelte.dev check
  • browser smoke check against local dev server: dark raw-state SVG text fill matched rgb(230, 230, 230) and dark env-static-public main colors resolved to rgb(46, 46, 46) / rgb(230, 230, 230)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

@Sean-Kenneth-Doherty is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

@Sean-Kenneth-Doherty Sean-Kenneth-Doherty marked this pull request as ready for review May 17, 2026 07:01
@Sean-Kenneth-Doherty
Copy link
Copy Markdown
Author

Local validation for 4ac2eeecee36a5d2e57cb063ddc055aa154a8d2e:

  • SHARP_IGNORE_GLOBAL_LIBVIPS=1 mise exec node@24.15.0 -- pnpm install --frozen-lockfile passed.
  • mise exec node@24.15.0 -- pnpm prettier --check <changed files> passed.
  • mise exec node@24.15.0 -- pnpm --filter svelte.dev exec node --input-type=module -e "compile changed Svelte files" <changed Svelte files> passed for the three changed tutorial components/pages.
  • mise exec node@24.15.0 -- pnpm --filter svelte.dev lint passed.
  • mise exec node@24.15.0 -- pnpm --filter svelte.dev check passed with svelte-check found 0 errors and 0 warnings.
  • git diff --check passed.

Browser smoke: I started the local dev server, set sv:theme=dark, and used headless Chrome 146/CDP to inspect the rendered tutorial previews.

  • /tutorial/svelte/raw-state: the result iframe SVG text nodes (50, 60, $SVLT) computed fill: rgb(230, 230, 230).
  • /tutorial/kit/env-static-public: the WebContainer preview loaded with ?theme=dark; the rendered <main> computed background-color: rgb(46, 46, 46) and color: rgb(230, 230, 230).

The Vercel status remains blocked on team authorization, so this is local validation only. The checkout is clean after validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant