fix: fix dark mode toggle#11
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
dariushdev-sveltekit | e9e9a75 | Commit Preview URL Branch Preview URL |
Feb 17 2026, 11:43 PM |
There was a problem hiding this comment.
Pull request overview
This pull request enhances the dark mode functionality by persisting user preferences client-side and improving CSS dark mode support. The changes ensure that users' theme choices are remembered across sessions when JavaScript is enabled, complementing the existing server-side theme toggle implementation used in the NoJS mode.
Changes:
- Added client-side cookie persistence for dark mode preference in the JS-enhanced terminal component
- Introduced a Tailwind CSS v4
@custom-variantfor dark mode styling
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/routes/Terminal.svelte | Added cookie persistence when toggling theme in JS-enhanced mode |
| src/routes/layout.css | Added custom dark variant definition for Tailwind CSS v4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to the application's theme handling, specifically focusing on dark mode support and user preference persistence. The main changes involve persisting the user's dark mode selection in a cookie and enhancing dark mode styling support in the CSS.
Theme persistence and user experience:
toggleTheme(inTerminal.svelte) to save the user's dark mode preference in a cookie, ensuring the preference is remembered across sessions.Styling and dark mode support:
@custom-variant darkCSS rule inlayout.cssto streamline dark mode styling for the application.