From 335374aa6d12f9b316f0741a8484ee5f338fd5de Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Fri, 17 Mar 2023 11:19:13 +0100 Subject: [PATCH] docs(a11y): update syntax highlighting theme to fix contrast issues (#3341) This PR changes the syntax highlighting theme we use in the docs. The reason for the change is that the previous theme we used didn't have sufficient color contrast between its comment strings and its background. ## Options I decided to use the Oceanic Next color theme that is included with docusaurus. Looking through, the only other dark theme that also passed AA contrast checks was VS Dark. The reason I picked Oceanic over VS Dark is simply that I like it better. For demonstration, here's what the Oceanic theme looks like: ![image](https://user-images.githubusercontent.com/17786332/225867069-f0d9c721-8927-4e70-984e-b9160992811b.png) And here's the VS Dark theme: ![image](https://user-images.githubusercontent.com/17786332/225867089-6dac9cb2-6ebb-4b9e-ae5c-3be9956cbf60.png) ## Bonus change The PR also includes a fix to render a pricing admonition correctly. It's not related to the PR, but I noticed it rendered incorrectly while I was working on it. --- website/docs/tutorials/quickstart.md | 2 +- website/docusaurus.config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/tutorials/quickstart.md b/website/docs/tutorials/quickstart.md index db56f157d6..b163003109 100644 --- a/website/docs/tutorials/quickstart.md +++ b/website/docs/tutorials/quickstart.md @@ -110,7 +110,7 @@ Now you can fetch the feature toggle you created and try turning it on / off in If you want to set up your own instance for testing purposes you can easily do so by using one of our premade setup kits for Heroku or DigitalOcean. -::: info Pricing +:::info Pricing Both DigitalOcean and Heroku will charge you for running Unleash on their services. However, if you use the DigitalOcean link below and are a new user, you will receive $100 in free credits. diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index a976c37e7f..ade265f42e 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -88,6 +88,7 @@ module.exports = { ], }, prism: { + theme: require('prism-react-renderer/themes/oceanicNext'), additionalLanguages: [ 'csharp', 'dart',