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

Update syntax highlighting colors for docs #326

Open
matttelliott opened this issue Nov 2, 2022 · 2 comments
Open

Update syntax highlighting colors for docs #326

matttelliott opened this issue Nov 2, 2022 · 2 comments

Comments

@matttelliott
Copy link

matttelliott commented Nov 2, 2022

Hello!

Thank you for creating this great type library and the wonderful read-along! I have learned a lot about typescript from studying this library and I have become a huge advocate both for this library and stronger types in general within my team.

However, one somewhat minor issue I've struggled with here is reading the documentation online. I'm not sure if others have experienced this, but when I view the docs online at https://millsp.github.io/ts-toolbelt/ , I've found the examples to be very difficult to read due to the low contrast of the colors on more than one machine that I use regularly. I typically use an up-to-date install of mainline Google Chrome on MacOS using "Dark Mode" settings, and for me the code examples in the documentation are VERY difficult to read.

As far as I know, I don't have any particularly unusual local settings that would cause this, and I haven't had this issue with other docs or color schemes.

Here is a screenshot from my machine of the README page, both normal and selected. Other examples are similarly difficult for me to read.

image

image

image

image

Is there any chance of adopting an alternate color scheme?

@tranvansang
Copy link

This is the first time I know this library, after watching a Total Typescript video. And this is what I see in the website.

image

@benblank
Copy link

benblank commented Jan 3, 2023

I see the same using Chrome 108, Firefox 107, and Firefox 108, all on Windows 10, everything set to Light Mode. Based on how the docs are generated, this might be an upstream problem with either typedoc or the eledoc theme.

As a workaround, you can run the following snippet in your browser's developer console, which simply gives all the syntax-highlighted code blocks a nice, off-white background color.

document.querySelectorAll('code[class^=language-]').forEach((code) => code.parentNode.style.backgroundColor = 'wheat')

It needs run on every page, though, so you'll probably want to save it as a userscript for the site.

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

No branches or pull requests

3 participants