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

Fix dark mode code element readability #1801

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Fix dark mode code element readability #1801

merged 1 commit into from
Jul 27, 2023

Conversation

nc1z
Copy link
Contributor

@nc1z nc1z commented Jul 27, 2023

What does it do?

Updated scss for code element in dark mode so it is readable

Why is it needed?

Context:

  • As a Strapi user, I was reading the docs with dark mode. However, html elements wrapped in <code></code> in the document were barely readable. I was using windows but this occurs across all platforms (tested on mac/ios as well).

Before Fix:
image

After Fix:
image

Possible reason for the poor readability:

  • scss variables were inverted for dark mode, so maintainers may have used --strapi-neutral-100 thinking it was white
/** Dark mode */
@include dark {
  /** Dark Color: Neutral */
  --strapi-neutral-1000: #FFFFFF; /* both 800 and 900 identical in Figma */
  --strapi-neutral-900: #FFFFFF; /* both 800 and 900 identical in Figma */
  --strapi-neutral-800: #FFFFFF;
  --strapi-neutral-700: #EAEAEF;
  --strapi-neutral-600: #666687;
  --strapi-neutral-500: #c0c0cf;
  --strapi-neutral-400: #A5A5BA; /* incorrecly named in Figma */
  --strapi-neutral-300: #666687;
  --strapi-neutral-200: #4A4A6A;
  --strapi-neutral-150: #32324D;
  --strapi-neutral-100: #181826;
  --strapi-neutral-0: #212134;

  /** Dark Color: Primary */
  --strapi-primary-600: #7B79FF;
}

Related issue(s)/PR(s)

-

@nc1z nc1z requested a review from pwizla as a code owner July 27, 2023 15:25
@vercel
Copy link

vercel bot commented Jul 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 27, 2023 3:29pm

@strapi-cla
Copy link

strapi-cla commented Jul 27, 2023

CLA assistant check
All committers have signed the CLA.

@pwizla
Copy link
Collaborator

pwizla commented Jul 27, 2023

Thank you so much for the very detailed PR description, and for the fix, @nc1z!
We noticed this recently and were waiting for our designers before moving forward, but your suggestion is actually perfect! 👌
Users will thank you, and so do I! 🤗

It's approved, merged, should be live on docs.strapi.io in a few minutes, and will be mentioned in the next weekly snapshot release.

@pwizla pwizla merged commit bb931d2 into strapi:main Jul 27, 2023
@pwizla pwizla added this to the 4.12.1 milestone Jul 27, 2023
@pwizla pwizla added source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo pr: chore labels Jul 27, 2023
@pwizla pwizla changed the title [FIX] Dark Mode Code Element Readability Fix dark mode code element readability Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants