dark.scss 7.04 KB
Newer Older
1
/* https://github.com/MozMorris/tomorrow-pygments */
Sam Rose's avatar
Sam Rose committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15

/*
* Dark syntax colors
*/
$dark-new-bg: rgba(51, 255, 51, 0.1);
$dark-new-idiff: rgba(51, 255, 51, 0.2);
$dark-old-bg: rgba(255, 51, 51, 0.2);
$dark-old-idiff: rgba(255, 51, 51, 0.25);
$dark-border: #808080;
$dark-code-border: #666;
$dark-main-bg: #1d1f21;
$dark-main-color: #1d1f21;
$dark-line-color: #c5c8c6;
$dark-line-num-color: rgba(255, 255, 255, 0.3);
dimitrieh's avatar
dimitrieh committed
16 17
$dark-line-num-color-new: #627165;
$dark-line-num-color-old: #806565;
Sam Rose's avatar
Sam Rose committed
18 19 20 21 22
$dark-diff-not-empty-bg: #557;
$dark-highlight-bg: #ffe792;
$dark-highlight-color: $black;
$dark-pre-hll-bg: #373b41;
$dark-hll-bg: #373b41;
Phil Hughes's avatar
Phil Hughes committed
23
$dark-over-bg: #9f9ab5;
24
$dark-expanded-bg: #3e3e3e;
Sam Rose's avatar
Sam Rose committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
$dark-c: #969896;
$dark-err: #c66;
$dark-k: #b294bb;
$dark-l: #de935f;
$dark-n: #c5c8c6;
$dark-o: #8abeb7;
$dark-p: #c5c8c6;
$dark-cm: #969896;
$dark-cp: #969896;
$dark-c1: #969896;
$dark-cs: #969896;
$dark-gd: #c66;
$dark-gh: #c5c8c6;
$dark-gi: #b5bd68;
$dark-gp: #969896;
$dark-gu: #8abeb7;
$dark-kc: #b294bb;
$dark-kd: #b294bb;
$dark-kn: #8abeb7;
$dark-kp: #b294bb;
$dark-kr: #b294bb;
$dark-kt: #f0c674;
$dark-ld: #b5bd68;
$dark-m: #de935f;
$dark-s: #b5bd68;
$dark-na: #81a2be;
$dark-nb: #c5c8c6;
$dark-nc: #f0c674;
$dark-no: #c66;
$dark-nd: #8abeb7;
$dark-ni: #c5c8c6;
$dark-ne: #c66;
$dark-nf: #81a2be;
$dark-nl: #c5c8c6;
$dark-nn: #f0c674;
$dark-nx: #81a2be;
$dark-py: #c5c8c6;
$dark-nt: #8abeb7;
$dark-nv: #c66;
$dark-ow: #8abeb7;
$dark-w: #c5c8c6;
$dark-mf: #de935f;
$dark-mh: #de935f;
$dark-mi: #de935f;
$dark-mo: #de935f;
$dark-sb: #b5bd68;
$dark-sc: #c5c8c6;
$dark-sd: #969896;
$dark-s2: #b5bd68;
$dark-se: #de935f;
$dark-sh: #b5bd68;
$dark-si: #de935f;
$dark-sx: #b5bd68;
$dark-sr: #b5bd68;
$dark-s1: #b5bd68;
$dark-ss: #b5bd68;
$dark-bp: #c5c8c6;
$dark-vc: #c66;
$dark-vg: #c66;
$dark-vi: #c66;
$dark-il: #de935f;

87
.code.dark {
88
  // Line numbers
89 90
  .line-numbers,
  .diff-line-num {
Sam Rose's avatar
Sam Rose committed
91
    background-color: $dark-main-bg;
92
  }
93

94 95
  .diff-line-num,
  .diff-line-num a {
Sam Rose's avatar
Sam Rose committed
96
    color: $dark-line-num-color;
97 98
  }

99
  // Code itself
100 101
  pre.code,
  .diff-line-num {
Sam Rose's avatar
Sam Rose committed
102
    border-color: $dark-code-border;
103 104
  }

105 106 107
  &,
  pre.code,
  .line_holder .line_content {
Sam Rose's avatar
Sam Rose committed
108 109
    background-color: $dark-main-bg;
    color: $dark-line-color;
110 111 112 113
  }

  // Diff line
  .line_holder {
114 115 116 117
    &.match .line_content {
      @include dark-diff-match-line;
    }

118 119
    td.diff-line-num.hll:not(.empty-cell),
    td.line_content.hll:not(.empty-cell) {
Sam Rose's avatar
Sam Rose committed
120 121
      background-color: $dark-diff-not-empty-bg;
      border-color: darken($dark-diff-not-empty-bg, 15%);
122 123
    }

124 125
    .diff-line-num.new,
    .line_content.new {
Sam Rose's avatar
Sam Rose committed
126
      @include diff_background($dark-new-bg, $dark-new-idiff, $dark-border);
dimitrieh's avatar
dimitrieh committed
127 128 129 130 131

      &::before,
      a {
        color: $dark-line-num-color-new;
      }
132 133
    }

134 135
    .diff-line-num.old,
    .line_content.old {
Sam Rose's avatar
Sam Rose committed
136
      @include diff_background($dark-old-bg, $dark-old-idiff, $dark-border);
dimitrieh's avatar
dimitrieh committed
137 138 139 140 141

      &::before,
      a {
        color: $dark-line-num-color-old;
      }
142 143
    }

144
    .diff-line-num {
Phil Hughes's avatar
Phil Hughes committed
145 146
      &.is-over,
      &.hll:not(.empty-cell).is-over {
147 148
        background-color: $dark-over-bg;
        border-color: darken($dark-over-bg, 5%);
149 150

        a {
151
          color: darken($dark-over-bg, 15%);
152 153 154 155
        }
      }
    }

156
    .line_content.match {
157
      @include dark-diff-match-line;
158
    }
159 160 161 162 163

    &:not(.diff-expanded) + .diff-expanded,
    &.diff-expanded + .line_holder:not(.diff-expanded) {
      > .diff-line-num,
      > .line_content {
164
        border-top: 1px solid $black;
165 166 167 168 169 170
      }
    }

    &.diff-expanded {
      > .diff-line-num,
      > .line_content {
171 172
        background: $dark-expanded-bg;
        border-color: $dark-expanded-bg;
173 174
      }
    }
175 176
  }

177
  // highlight line via anchor
178
  pre .hll {
Sam Rose's avatar
Sam Rose committed
179
    background-color: $dark-pre-hll-bg !important;
180
  }
181 182 183

  // Search result highlight
  span.highlight_word {
Sam Rose's avatar
Sam Rose committed
184 185
    background-color: $dark-highlight-bg !important;
    color: $dark-highlight-color !important;
186
  }
187

Douwe Maan's avatar
Douwe Maan committed
188 189 190 191 192
  // Links to URLs, emails, or dependencies
  .line a {
    color: $dark-na;
  }

Sam Rose's avatar
Sam Rose committed
193 194 195 196 197 198 199 200 201 202 203 204 205
  .hll { background-color: $dark-hll-bg; }
  .c { color: $dark-c; } /* Comment */
  .err { color: $dark-err; } /* Error */
  .k { color: $dark-k; } /* Keyword */
  .l { color: $dark-l; } /* Literal */
  .n { color: $dark-n; } /* Name */
  .o { color: $dark-o; } /* Operator */
  .p { color: $dark-p; } /* Punctuation */
  .cm { color: $dark-cm; } /* Comment.Multiline */
  .cp { color: $dark-cp; } /* Comment.Preproc */
  .c1 { color: $dark-c1; } /* Comment.Single */
  .cs { color: $dark-cs; } /* Comment.Special */
  .gd { color: $dark-gd; } /* Generic.Deleted */
206
  .ge { font-style: italic; } /* Generic.Emph */
207
  .gh { color: $dark-gh; font-weight: $gl-font-weight-bold; } /* Generic.Heading */
Sam Rose's avatar
Sam Rose committed
208
  .gi { color: $dark-gi; } /* Generic.Inserted */
209 210 211
  .gp { color: $dark-gp; font-weight: $gl-font-weight-bold; } /* Generic.Prompt */
  .gs { font-weight: $gl-font-weight-bold; } /* Generic.Strong */
  .gu { color: $dark-gu; font-weight: $gl-font-weight-bold; } /* Generic.Subheading */
Sam Rose's avatar
Sam Rose committed
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
  .kc { color: $dark-kc; } /* Keyword.Constant */
  .kd { color: $dark-kd; } /* Keyword.Declaration */
  .kn { color: $dark-kn; } /* Keyword.Namespace */
  .kp { color: $dark-kp; } /* Keyword.Pseudo */
  .kr { color: $dark-kr; } /* Keyword.Reserved */
  .kt { color: $dark-kt; } /* Keyword.Type */
  .ld { color: $dark-ld; } /* Literal.Date */
  .m { color: $dark-m; } /* Literal.Number */
  .s { color: $dark-s; } /* Literal.String */
  .na { color: $dark-na; } /* Name.Attribute */
  .nb { color: $dark-nb; } /* Name.Builtin */
  .nc { color: $dark-nc; } /* Name.Class */
  .no { color: $dark-no; } /* Name.Constant */
  .nd { color: $dark-nd; } /* Name.Decorator */
  .ni { color: $dark-ni; } /* Name.Entity */
  .ne { color: $dark-ne; } /* Name.Exception */
  .nf { color: $dark-nf; } /* Name.Function */
  .nl { color: $dark-nl; } /* Name.Label */
  .nn { color: $dark-nn; } /* Name.Namespace */
  .nx { color: $dark-nx; } /* Name.Other */
  .py { color: $dark-py; } /* Name.Property */
  .nt { color: $dark-nt; } /* Name.Tag */
  .nv { color: $dark-nv; } /* Name.Variable */
  .ow { color: $dark-ow; } /* Operator.Word */
  .w { color: $dark-w; } /* Text.Whitespace */
  .mf { color: $dark-mf; } /* Literal.Number.Float */
  .mh { color: $dark-mh; } /* Literal.Number.Hex */
  .mi { color: $dark-mi; } /* Literal.Number.Integer */
  .mo { color: $dark-mo; } /* Literal.Number.Oct */
  .sb { color: $dark-sb; } /* Literal.String.Backtick */
  .sc { color: $dark-sc; } /* Literal.String.Char */
  .sd { color: $dark-sd; } /* Literal.String.Doc */
  .s2 { color: $dark-s2; } /* Literal.String.Double */
  .se { color: $dark-se; } /* Literal.String.Escape */
  .sh { color: $dark-sh; } /* Literal.String.Heredoc */
  .si { color: $dark-si; } /* Literal.String.Interpol */
  .sx { color: $dark-sx; } /* Literal.String.Other */
  .sr { color: $dark-sr; } /* Literal.String.Regex */
  .s1 { color: $dark-s1; } /* Literal.String.Single */
  .ss { color: $dark-ss; } /* Literal.String.Symbol */
  .bp { color: $dark-bp; } /* Name.Builtin.Pseudo */
  .vc { color: $dark-vc; } /* Name.Variable.Class */
  .vg { color: $dark-vg; } /* Name.Variable.Global */
  .vi { color: $dark-vi; } /* Name.Variable.Instance */
  .il { color: $dark-il; } /* Literal.Number.Integer.Long */
257
}