fsprojects / FSharp.Formatting

F# tools for generating documentation (Markdown processor and F# code formatter)
https://fsprojects.github.io/FSharp.Formatting/
Other
464 stars 155 forks source link

Option to have dark code schema ? #781

Closed Thorium closed 11 months ago

Thorium commented 1 year ago

I was using this project to replace generate.fsx docs for SQLProvider. Worked pretty well, but the default colour schema is a bit "from 70s sofa" theme and I missed the dark more-VS-style-editor theme. So I added this theme file, it's not perfect, but feel free to improve.

I don't know how this project works, but I just run --parameters fsdocs-theme darkcode and even though all the docs says not supported, when I copied the file to my output content directory, behold!

The darkcode, this PR: image

...versus the default scheme: image

But as this was initial version, I definitely want to keep the original too, because it might feel comfy for some.

TheAngryByrd commented 1 year ago

So I expanded on your work a bit and extracted css variables for the colors you changed. (I didn't do the Font but that can be an exercise for later).

Example of changing light/dark dynamically

nojaf commented 11 months ago

Closing in favour of https://github.com/fsprojects/FSharp.Formatting/pull/861

Thorium commented 11 months ago

Ok, does the "modern" support a dark theme, or should I re-work similar PR?

nojaf commented 11 months ago

It does out of the box.