Skip to content

Commit 3efb265

Browse files
committed
Add overrideable variables file, and cleanup less
Before it was mandatory that a theme specify all these variables or else an error would be thrown complaining about missing variables if using this prettier plugin. Now themes can opt into overriding such variables.
1 parent 38ac08e commit 3efb265

File tree

2 files changed

+192
-136
lines changed

2 files changed

+192
-136
lines changed

prettify-variables.less

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/**
2+
* @stylesheet prettify-variables.less Prettify Variables
3+
* @parent bit-docs/theme
4+
*
5+
* @description Variables to customize code highlighting.
6+
*
7+
* @body
8+
*
9+
* Copy these variables into your theme's variables.less to modify.
10+
*/
11+
12+
/**
13+
* @styles color-palette Color Palette
14+
*
15+
* @description
16+
* Variables used to define the site's color palette.
17+
* @iframe demos/color-palette.html 630
18+
*/
19+
@darkSkies: #484848;
20+
@haze: #cccccc;
21+
@fog: #eae9e9;
22+
@clear: #ffffff;
23+
@sunrise: #f7f8c3;
24+
25+
26+
// Variables used to define color on text elements.
27+
28+
@colorCode: @sunrise;
29+
30+
31+
// Variables used to set the color on code syntax.
32+
33+
@str-color: #dd1144;
34+
@kwd-color: #333333;
35+
@com-color: #999988;
36+
@type-color: #445588;
37+
@lit-color: #445588;
38+
@pun-color: #333333;
39+
@opn-color: #333333;
40+
@clo-color: #333333;
41+
@tag-color: #navy;
42+
@atn-color: #teal;
43+
@atv-color: #dd1144;
44+
@dec-color: #333333;
45+
@var-color: #teal;
46+
@fun-color: #990000;
47+
48+
49+
// Variables used to set the color for print or projection.
50+
51+
@str-color-pp: #006600;
52+
@kwd-color-pp: #006;
53+
@com-color-pp: #600;
54+
@typ-color-pp: #404;
55+
@lit-color-pp: #004444;
56+
@pun-color-pp: #444400;
57+
@opn-color-pp: #444400;
58+
@clo-color-pp: #444400;
59+
@tag-color-pp: #006;
60+
@atn-color-pp: #440044;
61+
@atv-color-pp: #006600;

0 commit comments

Comments
 (0)