How to get Google Prettify to render more like Visual Studio

前端 未结 3 609
南方客
南方客 2020-12-13 02:21

I\'m using Googles excellent Code Prettify and I\'m quite happy with it.

But: Does anybody happen to have a alternate CSS stylesheet so it\'ll render a bit more like

3条回答
  •  心在旅途
    2020-12-13 03:01

    I don't use Visual Studio so I don't know the color scheme but Prettify is easy enough to modify.

    1. Download the full version (not the small version, as the CSS has been minified)
    2. Open the prettify.css file in the src directory. There are 10 or so "elements" you can change the color of.
    3. Grab the hex values of each color out of Visual Studio (if available; if not, you could use a color picker app to obtain the hex values).
    4. Replace the color attribute for each element in the CSS file.

    I'd throw it together myself really quick if I knew the colors but hopefully this helps!

提交回复
热议问题