annotate vendor/gems/coderay-0.9.7/lib/coderay/styles/cycnus.rb @ 855:7294e8db2515 bug_162

Close obsolete branch bug_162
author Chris Cannam
date Thu, 14 Jul 2011 11:59:19 +0100
parents 0579821a129a
children
rev   line source
Chris@210 1 module CodeRay
Chris@210 2 module Styles
Chris@210 3
Chris@210 4 class Cycnus < Style
Chris@210 5
Chris@210 6 register_for :cycnus
Chris@210 7
Chris@210 8 code_background = '#f8f8f8'
Chris@210 9 numbers_background = '#def'
Chris@210 10 border_color = 'silver'
Chris@210 11 normal_color = '#000'
Chris@210 12
Chris@210 13 CSS_MAIN_STYLES = <<-MAIN
Chris@210 14 .CodeRay {
Chris@210 15 background-color: #{code_background};
Chris@210 16 border: 1px solid #{border_color};
Chris@210 17 font-family: 'Courier New', 'Terminal', monospace;
Chris@210 18 color: #{normal_color};
Chris@210 19 }
Chris@210 20 .CodeRay pre { margin: 0px }
Chris@210 21
Chris@210 22 div.CodeRay { }
Chris@210 23
Chris@210 24 span.CodeRay { white-space: pre; border: 0px; padding: 2px }
Chris@210 25
Chris@210 26 table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px }
Chris@210 27 table.CodeRay td { padding: 2px 4px; vertical-align: top }
Chris@210 28
Chris@210 29 .CodeRay .line_numbers, .CodeRay .no {
Chris@210 30 background-color: #{numbers_background};
Chris@210 31 color: gray;
Chris@210 32 text-align: right;
Chris@210 33 }
Chris@210 34 .CodeRay .line_numbers tt { font-weight: bold }
Chris@210 35 .CodeRay .line_numbers .highlighted { color: red }
Chris@210 36 .CodeRay .line { display: block; float: left; width: 100%; }
Chris@210 37 .CodeRay .no { padding: 0px 4px }
Chris@210 38 .CodeRay .code { width: 100% }
Chris@210 39
Chris@210 40 ol.CodeRay { font-size: 10pt }
Chris@210 41 ol.CodeRay li { white-space: pre }
Chris@210 42
Chris@210 43 .CodeRay .code pre { overflow: auto }
Chris@210 44 MAIN
Chris@210 45
Chris@210 46 TOKEN_COLORS = <<-'TOKENS'
Chris@210 47 .debug { color:white ! important; background:blue ! important; }
Chris@210 48
Chris@210 49 .af { color:#00C }
Chris@210 50 .an { color:#007 }
Chris@210 51 .at { color:#f08 }
Chris@210 52 .av { color:#700 }
Chris@210 53 .aw { color:#C00 }
Chris@210 54 .bi { color:#509; font-weight:bold }
Chris@210 55 .c { color:#888; }
Chris@210 56
Chris@210 57 .ch { color:#04D }
Chris@210 58 .ch .k { color:#04D }
Chris@210 59 .ch .dl { color:#039 }
Chris@210 60
Chris@210 61 .cl { color:#B06; font-weight:bold }
Chris@210 62 .cm { color:#A08; font-weight:bold }
Chris@210 63 .co { color:#036; font-weight:bold }
Chris@210 64 .cr { color:#0A0 }
Chris@210 65 .cv { color:#369 }
Chris@210 66 .de { color:#B0B; }
Chris@210 67 .df { color:#099; font-weight:bold }
Chris@210 68 .di { color:#088; font-weight:bold }
Chris@210 69 .dl { color:black }
Chris@210 70 .do { color:#970 }
Chris@210 71 .dt { color:#34b }
Chris@210 72 .ds { color:#D42; font-weight:bold }
Chris@210 73 .e { color:#666; font-weight:bold }
Chris@210 74 .en { color:#800; font-weight:bold }
Chris@210 75 .er { color:#F00; background-color:#FAA }
Chris@210 76 .ex { color:#C00; font-weight:bold }
Chris@210 77 .fl { color:#60E; font-weight:bold }
Chris@210 78 .fu { color:#06B; font-weight:bold }
Chris@210 79 .gv { color:#d70; font-weight:bold }
Chris@210 80 .hx { color:#058; font-weight:bold }
Chris@210 81 .i { color:#00D; font-weight:bold }
Chris@210 82 .ic { color:#B44; font-weight:bold }
Chris@210 83
Chris@210 84 .il { background: #ddd; color: black }
Chris@210 85 .il .il { background: #ccc }
Chris@210 86 .il .il .il { background: #bbb }
Chris@210 87 .il .idl { background: #ddd; font-weight: bold; color: #666 }
Chris@210 88 .idl { background-color: #bbb; font-weight: bold; color: #666; }
Chris@210 89
Chris@210 90 .im { color:#f00; }
Chris@210 91 .in { color:#B2B; font-weight:bold }
Chris@210 92 .iv { color:#33B }
Chris@210 93 .la { color:#970; font-weight:bold }
Chris@210 94 .lv { color:#963 }
Chris@210 95 .oc { color:#40E; font-weight:bold }
Chris@210 96 .of { color:#000; font-weight:bold }
Chris@210 97 .op { }
Chris@210 98 .pc { color:#038; font-weight:bold }
Chris@210 99 .pd { color:#369; font-weight:bold }
Chris@210 100 .pp { color:#579; }
Chris@210 101 .ps { color:#00C; font-weight:bold }
Chris@210 102 .pt { color:#074; font-weight:bold }
Chris@210 103 .r, .kw { color:#080; font-weight:bold }
Chris@210 104
Chris@210 105 .ke { color: #808; }
Chris@210 106 .ke .dl { color: #606; }
Chris@210 107 .ke .ch { color: #80f; }
Chris@210 108 .vl { color: #088; }
Chris@210 109
Chris@210 110 .rx { background-color:#fff0ff }
Chris@210 111 .rx .k { color:#808 }
Chris@210 112 .rx .dl { color:#404 }
Chris@210 113 .rx .mod { color:#C2C }
Chris@210 114 .rx .fu { color:#404; font-weight: bold }
Chris@210 115
Chris@210 116 .s { background-color:#fff0f0; color: #D20; }
Chris@210 117 .s .s { background-color:#ffe0e0 }
Chris@210 118 .s .s .s { background-color:#ffd0d0 }
Chris@210 119 .s .k { }
Chris@210 120 .s .ch { color: #b0b; }
Chris@210 121 .s .dl { color: #710; }
Chris@210 122
Chris@210 123 .sh { background-color:#f0fff0; color:#2B2 }
Chris@210 124 .sh .k { }
Chris@210 125 .sh .dl { color:#161 }
Chris@210 126
Chris@210 127 .sy { color:#A60 }
Chris@210 128 .sy .k { color:#A60 }
Chris@210 129 .sy .dl { color:#630 }
Chris@210 130
Chris@210 131 .ta { color:#070 }
Chris@210 132 .tf { color:#070; font-weight:bold }
Chris@210 133 .ts { color:#D70; font-weight:bold }
Chris@210 134 .ty { color:#339; font-weight:bold }
Chris@210 135 .v { color:#036 }
Chris@210 136 .xt { color:#444 }
Chris@210 137
Chris@210 138 .ins { background: #afa; }
Chris@210 139 .del { background: #faa; }
Chris@210 140 .chg { color: #aaf; background: #007; }
Chris@210 141 .head { color: #f8f; background: #505 }
Chris@210 142
Chris@210 143 .ins .ins { color: #080; font-weight:bold }
Chris@210 144 .del .del { color: #800; font-weight:bold }
Chris@210 145 .chg .chg { color: #66f; }
Chris@210 146 .head .head { color: #f4f; }
Chris@210 147 TOKENS
Chris@210 148
Chris@210 149 end
Chris@210 150
Chris@210 151 end
Chris@210 152 end