mumuki/mumuki-laboratory

View on GitHub
app/assets/stylesheets/mumuki_laboratory/application/modules/_highlight.scss

Summary

Maintainability
Test Coverage
/* See https://github.com/jneen/rouge/wiki/List-of-tokens */

pre {
  background-color: #f0f0f5;
}

.CodeMirror {
  line-height: 1.3;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.CodeMirror-matchingbracket {
  color: $mu-color-complementary !important;
  font-weight: bold;
}

.CodeMirror-lines pre.CodeMirror-placeholder {
  color: $mu-color-disabled;
}

/* See https://github.com/jneen/rouge/wiki/List-of-tokens */

$mu-color-highlight-background: #f0f0f5;

$mu-color-highlight-identifier: black;
$mu-color-highlight-keyword: $mu-color-info;
$mu-color-highlight-literal: #369434;
$mu-color-highlight-operator: $mu-color-complementary;
$mu-color-highlight-comment: grey;
$mu-color-highlight-punctuation: black;
$mu-color-highlight-text-whitespace: #bbbbbb;
$mu-color-highlight-string-interpolation: #d01040;

pre {
  background-color: $mu-color-highlight-background;
}

.mu-highlight-identifier,
.na, .nb, .nc, .no, .nd, .ni, .bp, .vc, .vg, .vi, .nx, .nv,
.nn, .nt,
.ace_function,
.ace_variable,
.ace_parameter,
.ace_identifier,
.ne,
.nf,
.nl,
.cm-variable,
.cm-variable-3,
.cm-builtin,
.cm-def,
.cm-attribute {
  color: $mu-color-highlight-identifier !important;
}

.mu-highlight-keyword,
.k, .kn, .kp, .kr, .kt, .kd, .ace_keyword, .ace_type,
.cm-type,
.cm-keyword {
  color: $mu-color-highlight-keyword !important;
  font-weight: bold !important;
}

.mu-highlight-literal,
.m, .mf, .mh, .mi, .mo,
.s, .sb, .sc, .sd, .s2, .se, .sh, .sx, .sr, .s1, .ss,
.kc,
.il,
.l,
.ace_boolean, .ace_numeric,
.ace_string, .ace_symbol,
.ace_hexadecimal, .ace_character,
.ace_decimal,
.cm-string,
.cm-string-2,
.cm-variable-2,
.cm-number {
  color: $mu-color-highlight-literal !important;
}

.mu-highlight-operator,
.ow, .o,
.ace_operator,
.ace_meta.ace_rule.ace_definition.ace_prolog,
.cm-operator {
  color: $mu-color-highlight-operator !important;
  font-weight: bold !important;
}

.mu-highlight-comment,
.ace_comment, .c, .cm, .cp, .c1, .cs,
.cm-comment {
  color: $mu-color-highlight-comment !important;
}

.mu-highlight-punctuation,
.ace_punctuation,
.ace_paren,
.p,
.ace_keyword.ace_operator.ace_definition.ace_prolog,
.cm-bracket,
.cm-punctuation,
pre code {
  color: black !important;
  font-weight: normal !important;
}

.mu-highlight-text-whitespace,
.w {
  color: $mu-color-highlight-text-whitespace;
}

.mu-highlight-string-interpolation,
.si {
  color: $mu-color-highlight-string-interpolation;
}

$mu-color-highlight-prolog-variables: $mu-color-info;
$mu-color-highlight-prolog-atoms: $mu-color-primary;

.mu-highlight-prolog-variables,
.ace_variable.ace_prolog,
.prolog .nv {
  color: $mu-color-highlight-prolog-variables !important;
  font-weight: normal !important;
}

.mu-highlight-prolog-atoms,
.ace_name.ace_prolog,
.ace_atom.ace_prolog,
.prolog .ss {
  color: $mu-color-highlight-prolog-atoms !important;
  font-weight: normal !important;
}

$mu-color-highlight-css-literal: #b96dba;

.css .m { color: $mu-color-highlight-literal !important; }
.css .nc { color: $mu-color-highlight-identifier !important; font-weight: bold !important; }
.css .nl { color: $mu-color-highlight-keyword !important; }
.css .n { color: $mu-color-highlight-css-literal !important; }
.css .nb { color: $mu-color-highlight-css-literal !important; }