Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add light mode #23

Merged
merged 9 commits into from
Feb 16, 2025
Merged

feat: add light mode #23

merged 9 commits into from
Feb 16, 2025

Conversation

ittipatken
Copy link

@ittipatken ittipatken commented Feb 1, 2025

This iteration is still subject to changes.
Screenshot 2025-02-02 at 10-01-42 Anki - powerful intelligent flashcards

@dae
Copy link
Member

dae commented Feb 2, 2025

Thanks for looking into this - I imagine some users will much prefer this version. My only meagre suggestion is that the shade of blue in things like links could be slightly darker.

@ittipatken ittipatken marked this pull request as ready for review February 4, 2025 11:34
@ittipatken
Copy link
Author

My only meagre suggestion is that the shade of blue in things like links could be slightly darker.

I have tried several colors, but none of them fit, so this will be fixed in the future.

@Toby-Rea
Copy link

Toby-Rea commented Feb 6, 2025

I think we can probably make this change without needing much change to the markup. For example, given the following CSS this handles most of the required changes to support light mode (it's not finalised though):

@layer base {
  :root {
    --foreground: 0, 0%, 0%;
    --background: 0, 0%, 97%;
    --primary: 205, 67%, 40%;
    --primary-darker: 208, 65%, 50%;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --foreground: 0, 0%, 100%;
      --background: 0, 0%, 3%;
      --primary: 205, 67%, 70%;
      --primary-darker: 208, 65%, 60%;
    }
  }

  body {
    @apply font-sans bg-background text-foreground;
  }
}

@theme {
  --font-sans: Outfit Variable, sans-serif;

  --color-primary-darker: hsl(var(--primary-darker));
  --color-foreground: hsl(var(--foreground));
  --color-background: hsl(var(--background));
  --color-primary: hsl(var(--primary));
  --color-secondary: #968ca8;
  --color-neutral: hsla(var(--foreground), 70%);
  --color-error: #ff5449;
}

@ittipatken
Copy link
Author

ittipatken commented Feb 10, 2025

This pull request is ready to be merged, but the background in dark mode will be darker again in accordance with Toby's suggestion.

  @media (prefers-color-scheme: dark) {
    :root {
      --foreground: 0, 0%, 100%;
      --background: 0, 0%, 3%;
      --primary: 205, 67%, 70%;
      --primary-darker: 208, 65%, 60%;
    }
 }

P.S. I am flexible with the color choices because they are very opinionated.

@dae
Copy link
Member

dae commented Feb 16, 2025

Sorry for the delay, and thank you again for this! I personally find the light mode to be a touch on the bright/washed-out side, but that may be just me - let's see how people find it :-)

@dae dae merged commit 797408b into ankitects:main Feb 16, 2025
1 check passed
@ittipatken ittipatken deleted the light-mode branch February 16, 2025 20:53
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.

3 participants