Skip to content

Commit c321a4c

Browse files
authored
Merge pull request #10 from bit-docs/remove-dead-code
Remove dead code, add variable file, and fix class
2 parents 114e4c9 + e82dbc0 commit c321a4c

File tree

3 files changed

+192
-138
lines changed

3 files changed

+192
-138
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;

prettify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = function(){
66
for(var i = 0; i < codes.length; i ++){
77
var code = codes[i];
88
if(code.parentNode.nodeName.toUpperCase() === "PRE"){
9-
code.className = code.className +" prettyprint";
9+
code.parentNode.className = code.parentNode.className + " prettyprint";
1010
}
1111
}
1212
//turn off batching (https://github.com/google/code-prettify/blob/master/src/prettify.js#L142)

0 commit comments

Comments
 (0)