debian-mirror-gitlab/app/assets/stylesheets/highlight/themes/monokai.scss

347 lines
10 KiB
SCSS
Raw Normal View History

2015-04-26 12:48:37 +05:30
/* https://github.com/richleland/pygments-css/blob/master/monokai.css */
2017-08-17 22:00:37 +05:30
2020-07-28 23:09:34 +05:30
@import '../common';
2022-07-16 23:28:13 +05:30
@import 'highlight.js/styles/base16/monokai.css';
2019-07-07 11:18:12 +05:30
2017-08-17 22:00:37 +05:30
/*
* Monokai Colors
*/
$monokai-bg: #272822;
$monokai-border: #555;
$monokai-text-color: #f8f8f2;
$monokai-line-num-color: rgba(255, 255, 255, 0.3);
$monokai-line-num-color-new: #707565;
$monokai-line-num-color-old: #7e736f;
$monokai-line-empty-bg: #49483e;
$monokai-line-empty-border: darken($monokai-line-empty-bg, 15%);
$monokai-diff-border: #808080;
$monokai-highlight-bg: #ffe792;
$monokai-expanded-bg: #3e3e3e;
2020-04-08 14:13:33 +05:30
$monokai-coverage: #a6e22e;
$monokai-no-coverage: #fd971f;
2017-08-17 22:00:37 +05:30
$monokai-new-bg: rgba(166, 226, 46, 0.1);
$monokai-new-idiff: rgba(166, 226, 46, 0.15);
$monokai-old-bg: rgba(254, 147, 140, 0.15);
$monokai-old-idiff: rgba(254, 147, 140, 0.2);
$monokai-hll: #49483e;
$monokai-c: #75715e;
$monokai-err-color: #960050;
$monokai-err-bg: #1e0010;
$monokai-k: #66d9ef;
$monokai-l: #ae81ff;
$monokai-n: #f8f8f2;
$monokai-o: #f92672;
$monokai-p: #f8f8f2;
$monokai-cm: #75715e;
$monokai-cp: #75715e;
$monokai-c1: #75715e;
$monokai-cs: #75715e;
2022-04-04 11:22:00 +05:30
$monokai-cd: #75715e;
2017-08-17 22:00:37 +05:30
$monokai-kc: #66d9ef;
$monokai-kd: #66d9ef;
$monokai-kn: #f92672;
$monokai-kp: #66d9ef;
$monokai-kr: #66d9ef;
$monokai-kt: #66d9ef;
$monokai-ld: #e6db74;
$monokai-m: #ae81ff;
$monokai-s: #e6db74;
$monokai-na: #a6e22e;
$monokai-nb: #f8f8f2;
$monokai-nc: #a6e22e;
$monokai-no: #66d9ef;
$monokai-nd: #a6e22e;
$monokai-ni: #f8f8f2;
$monokai-ne: #a6e22e;
$monokai-nf: #a6e22e;
$monokai-nl: #f8f8f2;
$monokai-nn: #f8f8f2;
$monokai-nx: #a6e22e;
$monokai-py: #f8f8f2;
$monokai-nt: #f92672;
$monokai-nv: #f8f8f2;
$monokai-ow: #f92672;
$monokai-w: #f8f8f2;
$monokai-mf: #ae81ff;
$monokai-mh: #ae81ff;
$monokai-mi: #ae81ff;
$monokai-mo: #ae81ff;
$monokai-sb: #e6db74;
$monokai-sc: #e6db74;
$monokai-sd: #e6db74;
$monokai-s2: #e6db74;
$monokai-se: #ae81ff;
$monokai-sh: #e6db74;
$monokai-si: #e6db74;
$monokai-sx: #e6db74;
$monokai-sr: #e6db74;
$monokai-s1: #e6db74;
$monokai-ss: #e6db74;
$monokai-bp: #f8f8f2;
$monokai-vc: #f8f8f2;
$monokai-vg: #f8f8f2;
$monokai-vi: #f8f8f2;
$monokai-il: #ae81ff;
$monokai-gu: #75715e;
$monokai-gd: #f92672;
$monokai-gi: #a6e22e;
2021-04-17 20:07:23 +05:30
$monokai-gh: #75715e;
2017-08-17 22:00:37 +05:30
2022-06-21 17:19:12 +05:30
:root {
--default-diff-color-deletion: #c87872;
--default-diff-color-addition: #678528;
}
2015-04-26 12:48:37 +05:30
.code.monokai {
2022-07-23 23:45:48 +05:30
// Highlight.js theme overrides (https://gitlab.com/gitlab-org/gitlab/-/issues/365167)
// We should be able to remove the overrides once the upstream issue is fixed (https://github.com/sourcegraph/sourcegraph/issues/23251)
@include hljs-override('string', $monokai-s);
@include hljs-override('attr', $monokai-na);
2022-08-13 15:12:31 +05:30
@include hljs-override('attribute', $monokai-n);
@include hljs-override('selector-tag', $monokai-nt);
2022-07-23 23:45:48 +05:30
@include hljs-override('keyword', $monokai-k);
@include hljs-override('variable', $monokai-nv);
@include hljs-override('variable.language_', $monokai-k);
@include hljs-override('title', $monokai-nf);
@include hljs-override('name', $monokai-k);
@include hljs-override('tag', $monokai-nt);
@include hljs-override('type', $monokai-nc);
@include hljs-override('number', $monokai-mf);
@include hljs-override('literal', $monokai-kc);
@include hljs-override('built_in', $monokai-n);
@include hljs-override('section', $monokai-gh);
@include hljs-override('bullet', $monokai-n);
@include hljs-override('subst', $monokai-p);
2022-08-13 15:12:31 +05:30
@include hljs-override('symbol', $monokai-ss);
@include hljs-override('title.class_.inherited__', $monokai-no);
2022-07-23 23:45:48 +05:30
2016-02-05 20:25:01 +05:30
// Line numbers
2021-04-29 21:17:54 +05:30
.file-line-num {
2022-08-27 11:52:29 +05:30
@include line-link($white, 'link');
}
.file-line-blame {
@include line-link($white, 'git');
}
.line-links {
@include line-hover-bg($monokai-bg);
2021-04-29 21:17:54 +05:30
}
2017-08-17 22:00:37 +05:30
.line-numbers,
2022-01-26 12:08:38 +05:30
.diff-line-num,
.code-search-line {
2017-08-17 22:00:37 +05:30
background-color: $monokai-bg;
2016-02-05 20:25:01 +05:30
}
2017-08-17 22:00:37 +05:30
.diff-line-num,
.diff-line-num a {
color: $monokai-line-num-color;
2016-02-05 20:25:01 +05:30
}
2014-09-02 18:07:02 +05:30
2016-02-05 20:25:01 +05:30
// Code itself
2017-08-17 22:00:37 +05:30
pre.code,
.diff-line-num {
border-color: $monokai-border;
2016-02-05 20:25:01 +05:30
}
2014-09-02 18:07:02 +05:30
2017-08-17 22:00:37 +05:30
&,
pre.code,
.line_holder .line_content {
background-color: $monokai-bg;
color: $monokai-text-color;
2014-09-02 18:07:02 +05:30
}
2022-07-16 23:28:13 +05:30
.diff-line-expand-button {
@include diff-expansion($gray-600, $gray-200, $gray-300, $white);
2019-10-12 21:52:04 +05:30
}
2016-02-05 20:25:01 +05:30
// Diff line
.line_holder {
2018-11-08 19:23:39 +05:30
&.match .line_content,
&.old-nonewline .line_content,
&.new-nonewline .line_content {
2016-09-13 17:45:13 +05:30
@include dark-diff-match-line;
}
2022-07-16 23:28:13 +05:30
&.diff-grid-row {
2022-11-25 23:54:43 +05:30
--diff-expansion-background-color: #{$gray-600};
2022-07-16 23:28:13 +05:30
@include dark-diff-expansion-line;
}
2021-01-29 00:20:46 +05:30
.diff-td.diff-line-num.hll:not(.empty-cell),
.diff-td.line-coverage.hll:not(.empty-cell),
2021-09-04 01:27:46 +05:30
.diff-td.line-codequality.hll:not(.empty-cell),
2021-01-29 00:20:46 +05:30
.diff-td.line_content.hll:not(.empty-cell),
2016-06-02 11:05:42 +05:30
td.diff-line-num.hll:not(.empty-cell),
2020-04-08 14:13:33 +05:30
td.line-coverage.hll:not(.empty-cell),
2016-06-02 11:05:42 +05:30
td.line_content.hll:not(.empty-cell) {
2017-08-17 22:00:37 +05:30
background-color: $monokai-line-empty-bg;
border-color: $monokai-line-empty-border;
}
2020-04-08 14:13:33 +05:30
.line-coverage {
@include line-coverage-border-color($monokai-coverage, $monokai-no-coverage);
}
2017-08-17 22:00:37 +05:30
.diff-line-num.new,
2020-04-08 14:13:33 +05:30
.line-coverage.new,
2021-09-04 01:27:46 +05:30
.line-codequality.new,
2022-08-13 15:12:31 +05:30
.line_content.new,
.diff-line-num.new-nomappinginraw,
.line-coverage.new-nomappinginraw,
.line-codequality.new-nomappinginraw,
.line_content.new-nomappinginraw {
2019-07-07 11:18:12 +05:30
@include diff-background($monokai-new-bg, $monokai-new-idiff, $monokai-diff-border);
2017-08-17 22:00:37 +05:30
&::before,
a {
color: $monokai-line-num-color-new;
}
2016-06-02 11:05:42 +05:30
}
2017-08-17 22:00:37 +05:30
.diff-line-num.old,
2020-04-08 14:13:33 +05:30
.line-coverage.old,
2021-09-04 01:27:46 +05:30
.line-codequality.old,
2022-08-13 15:12:31 +05:30
.line_content.old,
.diff-line-num.old-nomappinginraw,
.line-coverage.old-nomappinginraw,
.line-codequality.old-nomappinginraw,
.line_content.old-nomappinginraw {
2019-07-07 11:18:12 +05:30
@include diff-background($monokai-old-bg, $monokai-old-idiff, $monokai-diff-border);
2017-08-17 22:00:37 +05:30
&::before,
a {
color: $monokai-line-num-color-old;
}
2016-02-05 20:25:01 +05:30
}
2022-04-04 11:22:00 +05:30
&:not(.match) .diff-grid-left:hover,
&:not(.match) .diff-grid-right:hover,
2022-01-26 12:08:38 +05:30
&.code-search-line:hover {
2021-01-29 00:20:46 +05:30
.diff-line-num:not(.empty-cell) {
2022-01-26 12:08:38 +05:30
@include line-number-hover;
2021-01-29 00:20:46 +05:30
}
}
2017-08-17 22:00:37 +05:30
.diff-line-num {
&.is-over,
&.hll:not(.empty-cell).is-over {
2022-01-26 12:08:38 +05:30
@include line-number-hover;
2017-08-17 22:00:37 +05:30
}
2016-02-05 20:25:01 +05:30
}
.line_content.match {
2016-09-13 17:45:13 +05:30
@include dark-diff-match-line;
2016-02-05 20:25:01 +05:30
}
2017-08-17 22:00:37 +05:30
&:not(.diff-expanded) + .diff-expanded,
&.diff-expanded + .line_holder:not(.diff-expanded) {
> .diff-line-num,
2020-04-08 14:13:33 +05:30
> .line-coverage,
2017-08-17 22:00:37 +05:30
> .line_content {
border-top: 1px solid $black;
}
}
&.diff-expanded {
> .diff-line-num,
2020-04-08 14:13:33 +05:30
> .line-coverage,
2017-08-17 22:00:37 +05:30
> .line_content {
background: $monokai-expanded-bg;
border-color: $monokai-expanded-bg;
}
}
2014-09-02 18:07:02 +05:30
}
2021-03-08 18:12:59 +05:30
@include conflict-colors('monokai');
2015-04-26 12:48:37 +05:30
// highlight line via anchor
pre .hll {
2017-08-17 22:00:37 +05:30
background-color: $monokai-hll !important;
2014-09-02 18:07:02 +05:30
}
2015-09-25 12:07:36 +05:30
// Search result highlight
span.highlight_word {
2017-08-17 22:00:37 +05:30
background-color: $monokai-highlight-bg !important;
color: $black !important;
2015-09-25 12:07:36 +05:30
}
2017-09-10 17:25:29 +05:30
// Links to URLs, emails, or dependencies
.line a {
color: $monokai-k;
}
2017-08-17 22:00:37 +05:30
.hll { background-color: $monokai-hll; }
.c { color: $monokai-c; } /* Comment */
2020-07-28 23:09:34 +05:30
.err { /* Error */
color: $monokai-err-color;
background-color: $monokai-err-bg;
}
2017-08-17 22:00:37 +05:30
.k { color: $monokai-k; } /* Keyword */
.l { color: $monokai-l; } /* Literal */
.n { color: $monokai-n; } /* Name */
.o { color: $monokai-o; } /* Operator */
.p { color: $monokai-p; } /* Punctuation */
.cm { color: $monokai-cm; } /* Comment.Multiline */
.cp { color: $monokai-cp; } /* Comment.Preproc */
.c1 { color: $monokai-c1; } /* Comment.Single */
.cs { color: $monokai-cs; } /* Comment.Special */
2022-04-04 11:22:00 +05:30
.cd { color: $monokai-cd; } /* Comment.Doc */
2016-11-03 12:29:30 +05:30
.ge { font-style: italic; } /* Generic.Emph */
2018-03-17 18:26:18 +05:30
.gs { font-weight: $gl-font-weight-bold; } /* Generic.Strong */
2017-08-17 22:00:37 +05:30
.kc { color: $monokai-kc; } /* Keyword.Constant */
.kd { color: $monokai-kd; } /* Keyword.Declaration */
.kn { color: $monokai-kn; } /* Keyword.Namespace */
.kp { color: $monokai-kp; } /* Keyword.Pseudo */
.kr { color: $monokai-kr; } /* Keyword.Reserved */
.kt { color: $monokai-kt; } /* Keyword.Type */
.ld { color: $monokai-ld; } /* Literal.Date */
.m { color: $monokai-m; } /* Literal.Number */
.s { color: $monokai-s; } /* Literal.String */
.na { color: $monokai-na; } /* Name.Attribute */
.nb { color: $monokai-nb; } /* Name.Builtin */
.nc { color: $monokai-nc; } /* Name.Class */
.no { color: $monokai-no; } /* Name.Constant */
.nd { color: $monokai-nd; } /* Name.Decorator */
.ni { color: $monokai-ni; } /* Name.Entity */
.ne { color: $monokai-ne; } /* Name.Exception */
.nf { color: $monokai-nf; } /* Name.Function */
.nl { color: $monokai-nl; } /* Name.Label */
.nn { color: $monokai-nn; } /* Name.Namespace */
.nx { color: $monokai-nx; } /* Name.Other */
.py { color: $monokai-py; } /* Name.Property */
.nt { color: $monokai-nt; } /* Name.Tag */
.nv { color: $monokai-nv; } /* Name.Variable */
.ow { color: $monokai-ow; } /* Operator.Word */
.w { color: $monokai-w; } /* Text.Whitespace */
.mf { color: $monokai-mf; } /* Literal.Number.Float */
.mh { color: $monokai-mh; } /* Literal.Number.Hex */
.mi { color: $monokai-mi; } /* Literal.Number.Integer */
.mo { color: $monokai-mo; } /* Literal.Number.Oct */
.sb { color: $monokai-sb; } /* Literal.String.Backtick */
.sc { color: $monokai-sc; } /* Literal.String.Char */
.sd { color: $monokai-sd; } /* Literal.String.Doc */
.s2 { color: $monokai-s2; } /* Literal.String.Double */
.se { color: $monokai-se; } /* Literal.String.Escape */
.sh { color: $monokai-sh; } /* Literal.String.Heredoc */
.si { color: $monokai-si; } /* Literal.String.Interpol */
.sx { color: $monokai-sx; } /* Literal.String.Other */
.sr { color: $monokai-sr; } /* Literal.String.Regex */
.s1 { color: $monokai-s1; } /* Literal.String.Single */
.ss { color: $monokai-ss; } /* Literal.String.Symbol */
.bp { color: $monokai-bp; } /* Name.Builtin.Pseudo */
.vc { color: $monokai-vc; } /* Name.Variable.Class */
.vg { color: $monokai-vg; } /* Name.Variable.Global */
.vi { color: $monokai-vi; } /* Name.Variable.Instance */
.il { color: $monokai-il; } /* Literal.Number.Integer.Long */
.gu { color: $monokai-gu; } /* Generic.Subheading & Diff Unified/Comment? */
.gd { color: $monokai-gd; } /* Generic.Deleted & Diff Deleted */
.gi { color: $monokai-gi; } /* Generic.Inserted & Diff Inserted */
2021-04-17 20:07:23 +05:30
.gh { color: $monokai-gh; } /* Generic.Heading */
2014-09-02 18:07:02 +05:30
}