appt-org / appt-website

Appt.org website built with Docusaurus
https://appt.org
MIT License
12 stars 7 forks source link

Color contrast issue on code snippet for SwiftUI #62

Closed fbernutz closed 2 months ago

fbernutz commented 3 months ago

Describe the bug There's a color contrast issue on a code snippet where a part of the code is not readable in light mode.

To reproduce

  1. Go to https://appt.org/en/docs/swiftui/samples/accessibility-value in light mode
  2. Scroll down to the Swift snippet
  3. The "progress" in the snippet is light gray on white and not readable.

Expected behavior It should probably be black, since on dark mode the "progress" variable has the same color as the other "progress" in the code snippet.

Screenshots

Light Mode:

Screenshot 2024-08-26 at 09 23 03

Dark Mode:

Screenshot 2024-08-26 at 09 22 57

System Please provide the following information:

JJdeGroot commented 3 months ago

Thanks for letting us know.

For some reason, style="color: rgb(248, 248, 242);" is applied to the line of code: <span class="token-line" style="color: rgb(248, 248, 242);"> causing the text to be displayed in a white color instead of black.

It looks like Prism or Docusaurus is appending this styling, maybe @lisaklein or @laylahoogeveen knows why it happens and how to fix?

JJdeGroot commented 2 months ago

Hi @lisaklein & @laylahoogeveen thanks for fixing this!

Just deployed the changes to production. @fbernutz thanks again for letting us know. You might need to force refresh the CSS to see the change.