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

Add alternate code highlighting themes + a switcher #1

Open
3 tasks
AmeliaBR opened this issue Mar 8, 2018 · 2 comments
Open
3 tasks

Add alternate code highlighting themes + a switcher #1

AmeliaBR opened this issue Mar 8, 2018 · 2 comments

Comments

@AmeliaBR
Copy link
Collaborator

AmeliaBR commented Mar 8, 2018

Solarized Dark fails WCAG AA color contrast.

Probably want four options:

  • Solarized Light
  • Solarized Dark
  • a high-contrast light
  • a high-contrast dark

Need to:

  • Add CSS files for alternate color schemes (need to remember where I found the Pygments-compatible CSS file)
  • Write a short JS utility to
    • inject a select drop-down with the stylesheet options (& maybe style each option so it gives a preview of the colors)
    • save the user's selection choice in local storage
    • check for local storage settings on page load
    • swap the URL on the relevant stylesheet <link> if a stored setting is detected on load, or if the selected option changes
  • Add the JS to every page that uses syntax-highlighted code (and regret, once again, that I didn't spend the time to create a proper build & template system)
@AmeliaBR
Copy link
Collaborator Author

AmeliaBR commented Mar 8, 2018

Will Boyd suggests an alternative approach, using filters to tweak the color scheme without downloading separate CSS: https://codersblock.com/blog/customizing-github-gists/

@AmeliaBR
Copy link
Collaborator Author

Nice dark colour theme here by Sarah Drasner, but I'd need to convert it to the Pygments class names:
https://twitter.com/sarah_edo/status/997238414390022144

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

1 participant