annotate vendor/gems/coderay-1.0.0/lib/coderay/styles/alpha.rb @ 1481:93934eec7b56 issue_540

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