From 5106aa7fdc8bfc1d0ba8c728e7fbfea0fdf6fcb9 Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Mon, 8 Dec 2014 13:53:38 +0100 Subject: [PATCH] Re-generate Coderay syntax highlighting styles Coderay 1.0+ now uses more descriptive class names. We use the default (alpha) styles: `coderay stylesheet > app/assets/stylesheets/coderay.css` Hotfix # 17114 Signed-off-by: Alex Coles --- app/assets/stylesheets/coderay.css | 130 +++++++++++++++ app/assets/stylesheets/scm.css.sass | 236 +--------------------------- 2 files changed, 133 insertions(+), 233 deletions(-) create mode 100644 app/assets/stylesheets/coderay.css diff --git a/app/assets/stylesheets/coderay.css b/app/assets/stylesheets/coderay.css new file mode 100644 index 0000000000..79abc684cf --- /dev/null +++ b/app/assets/stylesheets/coderay.css @@ -0,0 +1,130 @@ +.CodeRay { + background-color: hsl(0,0%,95%); + border: 1px solid silver; + color: black; +} +.CodeRay pre { + margin: 0px; +} + +span.CodeRay { white-space: pre; border: 0px; padding: 2px; } + +table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px; } +table.CodeRay td { padding: 2px 4px; vertical-align: top; } + +.CodeRay .line-numbers { + background-color: hsl(180,65%,90%); + color: gray; + text-align: right; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} +.CodeRay .line-numbers a { + background-color: hsl(180,65%,90%) !important; + color: gray !important; + text-decoration: none !important; +} +.CodeRay .line-numbers pre { + word-break: normal; +} +.CodeRay .line-numbers a:target { color: blue !important; } +.CodeRay .line-numbers .highlighted { color: red !important; } +.CodeRay .line-numbers .highlighted a { color: red !important; } +.CodeRay span.line-numbers { padding: 0px 4px; } +.CodeRay .line { display: block; float: left; width: 100%; } +.CodeRay .code { width: 100%; } + +.CodeRay .debug { color: white !important; background: blue !important; } + +.CodeRay .annotation { color:#007 } +.CodeRay .attribute-name { color:#b48 } +.CodeRay .attribute-value { color:#700 } +.CodeRay .binary { color:#549 } +.CodeRay .binary .char { color:#325 } +.CodeRay .binary .delimiter { color:#325 } +.CodeRay .char { color:#D20 } +.CodeRay .char .content { color:#D20 } +.CodeRay .char .delimiter { color:#710 } +.CodeRay .class { color:#B06; font-weight:bold } +.CodeRay .class-variable { color:#369 } +.CodeRay .color { color:#0A0 } +.CodeRay .comment { color:#777 } +.CodeRay .comment .char { color:#444 } +.CodeRay .comment .delimiter { color:#444 } +.CodeRay .constant { color:#036; font-weight:bold } +.CodeRay .decorator { color:#B0B } +.CodeRay .definition { color:#099; font-weight:bold } +.CodeRay .delimiter { color:black } +.CodeRay .directive { color:#088; font-weight:bold } +.CodeRay .docstring { color:#D42; } +.CodeRay .doctype { color:#34b } +.CodeRay .done { text-decoration: line-through; color: gray } +.CodeRay .entity { color:#800; font-weight:bold } +.CodeRay .error { color:#F00; background-color:#FAA } +.CodeRay .escape { color:#666 } +.CodeRay .exception { color:#C00; font-weight:bold } +.CodeRay .float { color:#60E } +.CodeRay .function { color:#06B; font-weight:bold } +.CodeRay .function .delimiter { color:#024; font-weight:bold } +.CodeRay .global-variable { color:#d70 } +.CodeRay .hex { color:#02b } +.CodeRay .id { color:#33D; font-weight:bold } +.CodeRay .include { color:#B44; font-weight:bold } +.CodeRay .inline { background-color: hsla(0,0%,0%,0.07); color: black } +.CodeRay .inline-delimiter { font-weight: bold; color: #666 } +.CodeRay .instance-variable { color:#33B } +.CodeRay .integer { color:#00D } +.CodeRay .imaginary { color:#f00 } +.CodeRay .important { color:#D00 } +.CodeRay .key { color: #606 } +.CodeRay .key .char { color: #60f } +.CodeRay .key .delimiter { color: #404 } +.CodeRay .keyword { color:#080; font-weight:bold } +.CodeRay .label { color:#970; font-weight:bold } +.CodeRay .local-variable { color:#950 } +.CodeRay .map .content { color:#808 } +.CodeRay .map .delimiter { color:#40A} +.CodeRay .map { background-color:hsla(200,100%,50%,0.06); } +.CodeRay .namespace { color:#707; font-weight:bold } +.CodeRay .octal { color:#40E } +.CodeRay .operator { } +.CodeRay .predefined { color:#369; font-weight:bold } +.CodeRay .predefined-constant { color:#069 } +.CodeRay .predefined-type { color:#0a8; font-weight:bold } +.CodeRay .preprocessor { color:#579 } +.CodeRay .pseudo-class { color:#00C; font-weight:bold } +.CodeRay .regexp { background-color:hsla(300,100%,50%,0.06); } +.CodeRay .regexp .content { color:#808 } +.CodeRay .regexp .delimiter { color:#404 } +.CodeRay .regexp .modifier { color:#C2C } +.CodeRay .reserved { color:#080; font-weight:bold } +.CodeRay .shell { background-color:hsla(120,100%,50%,0.06); } +.CodeRay .shell .content { color:#2B2 } +.CodeRay .shell .delimiter { color:#161 } +.CodeRay .string { background-color:hsla(0,100%,50%,0.05); } +.CodeRay .string .char { color: #b0b } +.CodeRay .string .content { color: #D20 } +.CodeRay .string .delimiter { color: #710 } +.CodeRay .string .modifier { color: #E40 } +.CodeRay .symbol { color:#A60 } +.CodeRay .symbol .content { color:#A60 } +.CodeRay .symbol .delimiter { color:#740 } +.CodeRay .tag { color:#070; font-weight:bold } +.CodeRay .type { color:#339; font-weight:bold } +.CodeRay .value { color: #088 } +.CodeRay .variable { color:#037 } + +.CodeRay .insert { background: hsla(120,100%,50%,0.12) } +.CodeRay .delete { background: hsla(0,100%,50%,0.12) } +.CodeRay .change { color: #bbf; background: #007 } +.CodeRay .head { color: #f8f; background: #505 } +.CodeRay .head .filename { color: white; } + +.CodeRay .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; } +.CodeRay .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; } + +.CodeRay .insert .insert { color: #0c0; background:transparent; font-weight:bold } +.CodeRay .delete .delete { color: #c00; background:transparent; font-weight:bold } +.CodeRay .change .change { color: #88f } +.CodeRay .head .head { color: #f4f } diff --git a/app/assets/stylesheets/scm.css.sass b/app/assets/stylesheets/scm.css.sass index 59ef018661..12ab4001d9 100644 --- a/app/assets/stylesheets/scm.css.sass +++ b/app/assets/stylesheets/scm.css.sass @@ -25,6 +25,9 @@ * * See doc/COPYRIGHT.rdoc for more details. ++*/ +//= require_self +//= require coderay + @import fonts/openproject_icon_font div.changeset-changes ul @@ -180,239 +183,6 @@ div &.action_A background: #bfb -/************* CodeRay styles *************/ -.syntaxhl - div - display: inline - .line-numbers - padding: 2px 4px 2px 4px - background-color: #eee - margin: 0 - .code pre - overflow: auto - .debug - color: white !important - background: blue !important - - .af - color: #00C - .an - color: #007 - .at - color: #f08 - .av - color: #700 - .aw - color: #C00 - .bi - color: #509 - font-weight: bold - .comment - color: #888 - - .ch - color: #04D - .k - color: #04D - .dl - color: #039 - - .cl - color: #B06 - font-weight: bold - .cm - color: #A08 - font-weight: bold - .co - color: #036 - font-weight: bold - .cr - color: #0A0 - .cv - color: #369 - .de - color: #B0B - .df - color: #099 - font-weight: bold - .di - color: #088 - font-weight: bold - .dl - color: black - .do - color: #970 - .dt - color: #34b - .ds - color: #D42 - font-weight: bold - .e - color: #666 - font-weight: bold - .en - color: #800 - font-weight: bold - .er - color: #F00 - background-color: #FAA - .ex - color: #C00 - font-weight: bold - .fl - color: #60E - font-weight: bold - .fu - color: #06B - font-weight: bold - .gv - color: #d70 - font-weight: bold - .hx - color: #058 - font-weight: bold - .i - color: #00D - font-weight: bold - .ic - color: #B44 - font-weight: bold - - .il - background: #ddd - color: black - .il - background: #ccc - .il - background: #bbb - .idl - background: #ddd - font-weight: bold - color: #666 - .idl - background-color: #bbb - font-weight: bold - color: #666 - - .im - color: #f00 - .in - color: #B2B - font-weight: bold - .iv - color: #33B - .la - color: #970 - font-weight: bold - .lv - color: #963 - .oc - color: #40E - font-weight: bold - .of - color: #000 - font-weight: bold - .pc - color: #038 - font-weight: bold - .pd - color: #369 - font-weight: bold - .pp - color: #579 - .ps - color: #00C - font-weight: bold - .pt - color: #074 - font-weight: bold - .r, .kw - color: #080 - font-weight: bold - - .ke - color: #808 - .dl - color: #606 - .ch - color: #80f - .vl - color: #088 - - .rx - background-color: #fff0ff - .k - color: #808 - .dl - color: #404 - .mod - color: #C2C - .fu - color: #404 - font-weight: bold - - .s - background-color: #fff0f0 - color: #D20 - .s - background-color: #ffe0e0 - .s - background-color: #ffd0d0 - .ch - color: #b0b - .dl - color: #710 - - .sh - background-color: #f0fff0 - color: #2B2 - .dl - color: #161 - - .sy - color: #A60 - .k - color: #A60 - .dl - color: #630 - - .ta - color: #070 - .tf - color: #070 - font-weight: bold - .ts - color: #D70 - font-weight: bold - .ty - color: #339 - font-weight: bold - .v - color: #036 - .xt - color: #444 - - .ins - background: #cfc - .ins - color: #080 - font-weight: bold - .del - background: #fcc - .del - color: #800 - font-weight: bold - .chg - color: #aaf - background: #007 - .chg - color: #66f - .head - color: #f8f - background: #505 - .head - color: #f4f - tr.dir span &.dir-expander