stan-dev / docs

Documentation for the Stan language and CmdStan
https://mc-stan.org/docs/
Other
37 stars 107 forks source link

Add support for a dark theme #746

Closed WardBrian closed 4 months ago

WardBrian commented 5 months ago

Submission Checklist

Summary

Closes #738.

This adds a basic dark theme and cleans up some of our existing theme customizations

image

It still needs some color tweaks, especially for code blocks.

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

mitzimorris commented 5 months ago

FWIW, I used an online website to get the dark colors corresponding to primary color aquatic blue and lightest-beige, and it gave me this set:

/** SCSS DARK THEME PRIMARY COLORS */ 
 $primary-100:  #3e8ebc;
 $primary-200:  #599ac3;
 $primary-300:  #71a6cb;
 $primary-400:  #86b2d2;
 $primary-500:  #9bbfda;
 $primary-600:  #afcbe1;

 /** SCSS DARK THEME SURFACE COLORS */ 
 $surface-100:  #000000;
 $surface-200:  #1e1e1e;
 $surface-300:  #353535;
 $surface-400:  #4e4e4e;
 $surface-500:  #696969;
 $surface-600:  #858585;

 /** SCSS DARK THEME MIXED SURFACE COLORS */ 
 $surface-mixed-100:  #26465a;
 $surface-mixed-200:  #3d586b;
 $surface-mixed-300:  #546b7c;
 $surface-mixed-400:  #6b7f8e;
 $surface-mixed-500:  #8393a0;
 $surface-mixed-600:  #9ba8b2;

 /** EXAMPLES */ 
 color:  $surface-600; 
 background-color:  $primary-300;
WardBrian commented 5 months ago

I'm very happy if you or anyone else wants to tweak the colors here, I was mainly trying to get something working in Dark mode.

mitzimorris commented 5 months ago

getting this to work is awesome! happy to tweak colors.

WardBrian commented 4 months ago

Tweaked colors: image

mitzimorris commented 4 months ago

text color looks good! not as harsh as before.

WardBrian commented 4 months ago

I'm sure we could continue tweaking forever, but I think it is over the "good enough" line now. Especially because the code blocks are actually readable!