Mercurial > hg > soundsoftware-site
comparison vendor/gems/coderay-1.0.0/lib/coderay/styles/alpha.rb @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
908:c6c2cbd0afee | 909:cbb26bc654de |
---|---|
1 module CodeRay | |
2 module Styles | |
3 | |
4 # A colorful theme using CSS 3 colors (with alpha channel). | |
5 class Alpha < Style | |
6 | |
7 register_for :alpha | |
8 | |
9 code_background = 'hsl(0,0%,95%)' | |
10 numbers_background = 'hsl(180,65%,90%)' | |
11 border_color = 'silver' | |
12 normal_color = 'black' | |
13 | |
14 CSS_MAIN_STYLES = <<-MAIN # :nodoc: | |
15 .CodeRay { | |
16 background-color: #{code_background}; | |
17 border: 1px solid #{border_color}; | |
18 color: #{normal_color}; | |
19 } | |
20 .CodeRay pre { | |
21 margin: 0px; | |
22 } | |
23 | |
24 span.CodeRay { white-space: pre; border: 0px; padding: 2px; } | |
25 | |
26 table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px; } | |
27 table.CodeRay td { padding: 2px 4px; vertical-align: top; } | |
28 | |
29 .CodeRay .line-numbers { | |
30 background-color: #{numbers_background}; | |
31 color: gray; | |
32 text-align: right; | |
33 -webkit-user-select: none; | |
34 -moz-user-select: none; | |
35 user-select: none; | |
36 } | |
37 .CodeRay .line-numbers a { | |
38 background-color: #{numbers_background} !important; | |
39 color: gray !important; | |
40 text-decoration: none !important; | |
41 } | |
42 .CodeRay .line-numbers a:target { color: blue !important; } | |
43 .CodeRay .line-numbers .highlighted { color: red !important; } | |
44 .CodeRay .line-numbers .highlighted a { color: red !important; } | |
45 .CodeRay span.line-numbers { padding: 0px 4px; } | |
46 .CodeRay .line { display: block; float: left; width: 100%; } | |
47 .CodeRay .code { width: 100%; } | |
48 .CodeRay .code pre { overflow: auto; } | |
49 MAIN | |
50 | |
51 TOKEN_COLORS = <<-'TOKENS' | |
52 .debug { color: white !important; background: blue !important; } | |
53 | |
54 .annotation { color:#007 } | |
55 .attribute-name { color:#b48 } | |
56 .attribute-value { color:#700 } | |
57 .binary { color:#509 } | |
58 .char .content { color:#D20 } | |
59 .char .delimiter { color:#710 } | |
60 .char { color:#D20 } | |
61 .class { color:#B06; font-weight:bold } | |
62 .class-variable { color:#369 } | |
63 .color { color:#0A0 } | |
64 .comment { color:#777 } | |
65 .comment .char { color:#444 } | |
66 .comment .delimiter { color:#444 } | |
67 .complex { color:#A08 } | |
68 .constant { color:#036; font-weight:bold } | |
69 .decorator { color:#B0B } | |
70 .definition { color:#099; font-weight:bold } | |
71 .delimiter { color:black } | |
72 .directive { color:#088; font-weight:bold } | |
73 .doc { color:#970 } | |
74 .doc-string { color:#D42; font-weight:bold } | |
75 .doctype { color:#34b } | |
76 .entity { color:#800; font-weight:bold } | |
77 .error { color:#F00; background-color:#FAA } | |
78 .escape { color:#666 } | |
79 .exception { color:#C00; font-weight:bold } | |
80 .float { color:#60E } | |
81 .function { color:#06B; font-weight:bold } | |
82 .global-variable { color:#d70 } | |
83 .hex { color:#02b } | |
84 .imaginary { color:#f00 } | |
85 .include { color:#B44; font-weight:bold } | |
86 .inline { background-color: hsla(0,0%,0%,0.07); color: black } | |
87 .inline-delimiter { font-weight: bold; color: #666 } | |
88 .instance-variable { color:#33B } | |
89 .integer { color:#00D } | |
90 .key .char { color: #60f } | |
91 .key .delimiter { color: #404 } | |
92 .key { color: #606 } | |
93 .keyword { color:#080; font-weight:bold } | |
94 .label { color:#970; font-weight:bold } | |
95 .local-variable { color:#963 } | |
96 .namespace { color:#707; font-weight:bold } | |
97 .octal { color:#40E } | |
98 .operator { } | |
99 .predefined { color:#369; font-weight:bold } | |
100 .predefined-constant { color:#069 } | |
101 .predefined-type { color:#0a5; font-weight:bold } | |
102 .preprocessor { color:#579 } | |
103 .pseudo-class { color:#00C; font-weight:bold } | |
104 .regexp .content { color:#808 } | |
105 .regexp .delimiter { color:#404 } | |
106 .regexp .modifier { color:#C2C } | |
107 .regexp { background-color:hsla(300,100%,50%,0.06); } | |
108 .reserved { color:#080; font-weight:bold } | |
109 .shell .content { color:#2B2 } | |
110 .shell .delimiter { color:#161 } | |
111 .shell { background-color:hsla(120,100%,50%,0.06); } | |
112 .string .char { color: #b0b } | |
113 .string .content { color: #D20 } | |
114 .string .delimiter { color: #710 } | |
115 .string .modifier { color: #E40 } | |
116 .string { background-color:hsla(0,100%,50%,0.05); } | |
117 .symbol .content { color:#A60 } | |
118 .symbol .delimiter { color:#630 } | |
119 .symbol { color:#A60 } | |
120 .tag { color:#070 } | |
121 .type { color:#339; font-weight:bold } | |
122 .value { color: #088; } | |
123 .variable { color:#037 } | |
124 | |
125 .insert { background: hsla(120,100%,50%,0.12) } | |
126 .delete { background: hsla(0,100%,50%,0.12) } | |
127 .change { color: #bbf; background: #007; } | |
128 .head { color: #f8f; background: #505 } | |
129 .head .filename { color: white; } | |
130 | |
131 .delete .eyecatcher { background-color: hsla(0,100%,50%,0.2); border: 1px solid hsla(0,100%,45%,0.5); margin: -1px; border-bottom: none; border-top-left-radius: 5px; border-top-right-radius: 5px; } | |
132 .insert .eyecatcher { background-color: hsla(120,100%,50%,0.2); border: 1px solid hsla(120,100%,25%,0.5); margin: -1px; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } | |
133 | |
134 .insert .insert { color: #0c0; background:transparent; font-weight:bold } | |
135 .delete .delete { color: #c00; background:transparent; font-weight:bold } | |
136 .change .change { color: #88f } | |
137 .head .head { color: #f4f } | |
138 TOKENS | |
139 | |
140 end | |
141 | |
142 end | |
143 end |