summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/highlight/monokai.scss
blob: d8510baad8a5fa9d8953b103dd97db97c6ff96d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
/* https://github.com/richleland/pygments-css/blob/master/monokai.css */

/*
* Monokai Colors
*/
$monokai-bg: #272822;
$monokai-border: #555;
$monokai-text-color: #f8f8f2;
$monokai-line-num-color: rgba(255, 255, 255, 0.3);
$monokai-line-empty-bg: #49483e;
$monokai-line-empty-border: darken($monokai-line-empty-bg, 15%);
$monokai-diff-border: #808080;
$monokai-highlight-bg: #ffe792;

$monokai-new-bg: rgba(166, 226, 46, 0.1);
$monokai-new-idiff: rgba(166, 226, 46, 0.15);

$monokai-old-bg: rgba(254, 147, 140, 0.15);
$monokai-old-idiff: rgba(254, 147, 140, 0.2);

$monokai-hll: #49483e;
$monokai-c: #75715e;
$monokai-err-color: #960050;
$monokai-err-bg: #1e0010;
$monokai-k: #66d9ef;
$monokai-l: #ae81ff;
$monokai-n: #f8f8f2;
$monokai-o: #f92672;
$monokai-p: #f8f8f2;
$monokai-cm: #75715e;
$monokai-cp: #75715e;
$monokai-c1: #75715e;
$monokai-cs: #75715e;
$monokai-kc: #66d9ef;
$monokai-kd: #66d9ef;
$monokai-kn: #f92672;
$monokai-kp: #66d9ef;
$monokai-kr: #66d9ef;
$monokai-kt: #66d9ef;
$monokai-ld: #e6db74;
$monokai-m: #ae81ff;
$monokai-s: #e6db74;
$monokai-na: #a6e22e;
$monokai-nb: #f8f8f2;
$monokai-nc: #a6e22e;
$monokai-no: #66d9ef;
$monokai-nd: #a6e22e;
$monokai-ni: #f8f8f2;
$monokai-ne: #a6e22e;
$monokai-nf: #a6e22e;
$monokai-nl: #f8f8f2;
$monokai-nn: #f8f8f2;
$monokai-nx: #a6e22e;
$monokai-py: #f8f8f2;
$monokai-nt: #f92672;
$monokai-nv: #f8f8f2;
$monokai-ow: #f92672;
$monokai-w: #f8f8f2;
$monokai-mf: #ae81ff;
$monokai-mh: #ae81ff;
$monokai-mi: #ae81ff;
$monokai-mo: #ae81ff;
$monokai-sb: #e6db74;
$monokai-sc: #e6db74;
$monokai-sd: #e6db74;
$monokai-s2: #e6db74;
$monokai-se: #ae81ff;
$monokai-sh: #e6db74;
$monokai-si: #e6db74;
$monokai-sx: #e6db74;
$monokai-sr: #e6db74;
$monokai-s1: #e6db74;
$monokai-ss: #e6db74;
$monokai-bp: #f8f8f2;
$monokai-vc: #f8f8f2;
$monokai-vg: #f8f8f2;
$monokai-vi: #f8f8f2;
$monokai-il: #ae81ff;
$monokai-gu: #75715e;
$monokai-gd: #f92672;
$monokai-gi: #a6e22e;

.code.monokai {
  // Line numbers
  .line-numbers,
  .diff-line-num {
    background-color: $monokai-bg;
  }

  .diff-line-num,
  .diff-line-num a {
    color: $monokai-line-num-color;
  }

  // Code itself
  pre.code,
  .diff-line-num {
    border-color: $monokai-border;
  }

  &,
  pre.code,
  .line_holder .line_content {
    background-color: $monokai-bg;
    color: $monokai-text-color;
  }

  // Diff line
  .line_holder {
    &.match .line_content {
      @include dark-diff-match-line;
    }

    td.diff-line-num.hll:not(.empty-cell),
    td.line_content.hll:not(.empty-cell) {
      background-color: $monokai-line-empty-bg;
      border-color: $monokai-line-empty-border;
    }

    .diff-line-num.new,
    .line_content.new {
      @include diff_background($monokai-new-bg, $monokai-new-idiff, $monokai-diff-border);
    }

    .diff-line-num.old,
    .line_content.old {
      @include diff_background($monokai-old-bg, $monokai-old-idiff, $monokai-diff-border);
    }

    .line_content.match {
      @include dark-diff-match-line;
    }
  }

  // highlight line via anchor
  pre .hll {
    background-color: $monokai-hll !important;
  }

  // Search result highlight
  span.highlight_word {
    background-color: $monokai-highlight-bg !important;
    color: $black !important;
  }

  .hll { background-color: $monokai-hll; }
  .c { color: $monokai-c; } /* Comment */
  .err { color: $monokai-err-color; background-color: $monokai-err-bg; } /* Error */
  .k { color: $monokai-k; } /* Keyword */
  .l { color: $monokai-l; } /* Literal */
  .n { color: $monokai-n; } /* Name */
  .o { color: $monokai-o; } /* Operator */
  .p { color: $monokai-p; } /* Punctuation */
  .cm { color: $monokai-cm; } /* Comment.Multiline */
  .cp { color: $monokai-cp; } /* Comment.Preproc */
  .c1 { color: $monokai-c1; } /* Comment.Single */
  .cs { color: $monokai-cs; } /* Comment.Special */
  .ge { font-style: italic; } /* Generic.Emph */
  .gs { font-weight: bold; } /* Generic.Strong */
  .kc { color: $monokai-kc; } /* Keyword.Constant */
  .kd { color: $monokai-kd; } /* Keyword.Declaration */
  .kn { color: $monokai-kn; } /* Keyword.Namespace */
  .kp { color: $monokai-kp; } /* Keyword.Pseudo */
  .kr { color: $monokai-kr; } /* Keyword.Reserved */
  .kt { color: $monokai-kt; } /* Keyword.Type */
  .ld { color: $monokai-ld; } /* Literal.Date */
  .m { color: $monokai-m; } /* Literal.Number */
  .s { color: $monokai-s; } /* Literal.String */
  .na { color: $monokai-na; } /* Name.Attribute */
  .nb { color: $monokai-nb; } /* Name.Builtin */
  .nc { color: $monokai-nc; } /* Name.Class */
  .no { color: $monokai-no; } /* Name.Constant */
  .nd { color: $monokai-nd; } /* Name.Decorator */
  .ni { color: $monokai-ni; } /* Name.Entity */
  .ne { color: $monokai-ne; } /* Name.Exception */
  .nf { color: $monokai-nf; } /* Name.Function */
  .nl { color: $monokai-nl; } /* Name.Label */
  .nn { color: $monokai-nn; } /* Name.Namespace */
  .nx { color: $monokai-nx; } /* Name.Other */
  .py { color: $monokai-py; } /* Name.Property */
  .nt { color: $monokai-nt; } /* Name.Tag */
  .nv { color: $monokai-nv; } /* Name.Variable */
  .ow { color: $monokai-ow; } /* Operator.Word */
  .w { color: $monokai-w; } /* Text.Whitespace */
  .mf { color: $monokai-mf; } /* Literal.Number.Float */
  .mh { color: $monokai-mh; } /* Literal.Number.Hex */
  .mi { color: $monokai-mi; } /* Literal.Number.Integer */
  .mo { color: $monokai-mo; } /* Literal.Number.Oct */
  .sb { color: $monokai-sb; } /* Literal.String.Backtick */
  .sc { color: $monokai-sc; } /* Literal.String.Char */
  .sd { color: $monokai-sd; } /* Literal.String.Doc */
  .s2 { color: $monokai-s2; } /* Literal.String.Double */
  .se { color: $monokai-se; } /* Literal.String.Escape */
  .sh { color: $monokai-sh; } /* Literal.String.Heredoc */
  .si { color: $monokai-si; } /* Literal.String.Interpol */
  .sx { color: $monokai-sx; } /* Literal.String.Other */
  .sr { color: $monokai-sr; } /* Literal.String.Regex */
  .s1 { color: $monokai-s1; } /* Literal.String.Single */
  .ss { color: $monokai-ss; } /* Literal.String.Symbol */
  .bp { color: $monokai-bp; } /* Name.Builtin.Pseudo */
  .vc { color: $monokai-vc; } /* Name.Variable.Class */
  .vg { color: $monokai-vg; } /* Name.Variable.Global */
  .vi { color: $monokai-vi; } /* Name.Variable.Instance */
  .il { color: $monokai-il; } /* Literal.Number.Integer.Long */
  .gu { color: $monokai-gu; } /* Generic.Subheading & Diff Unified/Comment? */
  .gd { color: $monokai-gd; } /* Generic.Deleted & Diff Deleted */
  .gi { color: $monokai-gi; } /* Generic.Inserted & Diff Inserted */
}