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

374 lines
10 KiB
SCSS
Raw Permalink Normal View History

2015-04-26 12:48:37 +05:30
/* https://github.com/MozMorris/tomorrow-pygments */
2017-08-17 22:00:37 +05:30
2020-07-28 23:09:34 +05:30
@import '../common';
2022-06-21 17:19:12 +05:30
@import '../hljs';
2019-07-07 11:18:12 +05:30
2017-08-17 22:00:37 +05:30
/*
* 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);
$dark-line-num-color-new: #627165;
$dark-line-num-color-old: #806565;
$dark-diff-not-empty-bg: #557;
$dark-highlight-bg: #ffe792;
$dark-highlight-color: $black;
$dark-pre-hll-bg: #373b41;
$dark-hll-bg: #373b41;
$dark-expanded-bg: #3e3e3e;
2021-03-08 18:12:59 +05:30
$dark-coverage: #b3e841;
$dark-no-coverage: #ff4f33;
2017-08-17 22:00:37 +05:30
$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;
2022-04-04 11:22:00 +05:30
$dark-cd: #969896;
2017-08-17 22:00:37 +05:30
$dark-gd: #c66;
2021-04-17 20:07:23 +05:30
$dark-gh: #8abeb7;
2017-08-17 22:00:37 +05:30
$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;
2022-06-21 17:19:12 +05:30
:root {
--color-hljs-comment: #{$dark-c};
--color-hljs-variable: #{$dark-k};
--color-hljs-link: #{$dark-l};
--color-hljs-meta: #{$dark-cp};
--color-hljs-keyword: #{$dark-kd};
--color-hljs-type: #{$dark-kt};
--color-hljs-attr: #{$dark-na};
--color-hljs-builtin: #{$dark-nb};
--color-hljs-title: #{$dark-n};
--color-hljs-class: #{$dark-nc};
--color-hljs-function: #{$dark-nf};
--color-hljs-tag: #{$dark-nt};
--color-hljs-number: #{$dark-mi};
--color-hljs-subst: #{$dark-sc};
--color-hljs-string: #{$dark-s1};
--color-hljs-symbol: #{$dark-ss};
--color-hljs-variable: #{$dark-vi};
--color-hljs-operator: #{$dark-o};
--color-hljs-punctuation: #{$dark-p};
--color-hljs-regexp: #{$dark-sr};
--color-hljs-constant: #{$dark-nx};
--color-hljs-literal: #{$dark-kc};
--color-hljs-language: #{$dark-nx};
--color-hljs-params: #{$dark-nx};
--color-hljs-selector-doctag: #{$dark-cm};
--color-hljs-selector-tag: #{$dark-nt};
--color-hljs-selector-class: #{$dark-nc};
--color-hljs-selector-id: #{$dark-nn};
--color-hljs-selector-attr: #{$dark-nt};
--color-hljs-selector-pseudo: #{$dark-nd};
--default-diff-color-deletion: #ff3333;
--default-diff-color-addition: #288f2a;
}
2015-04-26 12:48:37 +05:30
.code.dark {
2023-01-13 00:05: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('title\\.class', $dark-nc);
@include hljs-override('title\\.class\\.inherited', $dark-no);
@include hljs-override('variable\\.constant', $dark-no);
@include hljs-override('title\\.function', $dark-nf);
2023-04-23 21:23:45 +05:30
2023-01-13 00:05: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($dark-main-bg);
2021-04-29 21:17:54 +05:30
}
2022-01-26 12:08:38 +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: $dark-main-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: $dark-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: $dark-code-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: $dark-main-bg;
color: $dark-line-color;
2015-04-26 12:48:37 +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
}
2023-04-23 21:23:45 +05:30
.diff-grid-row.line_holder.diff-tr .diff-td.commented:not(.hll) {
--highlight-border-color: #{$blue-600};
background-color: $blue-900;
}
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;
}
2023-04-23 21:23:45 +05:30
.diff-td.diff-line-num.hll,
.diff-td.line-coverage.hll,
.diff-td.line-codequality.hll,
.diff-td.line_content.hll,
td.diff-line-num.hll,
td.line-coverage.hll,
td.line_content.hll {
--highlight-border-color: #{$orange-500};
background-color: $orange-800;
2016-06-02 11:05:42 +05:30
}
2020-04-08 14:13:33 +05:30
.line-coverage {
@include line-coverage-border-color($dark-coverage, $dark-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($dark-new-bg, $dark-new-idiff, $dark-border);
2017-08-17 22:00:37 +05:30
&::before,
a {
color: $dark-line-num-color-new;
}
2016-02-05 20:25:01 +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($dark-old-bg, $dark-old-idiff, $dark-border);
2017-08-17 22:00:37 +05:30
&::before,
a {
color: $dark-line-num-color-old;
}
}
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) {
2023-04-23 21:23:45 +05:30
@include line-number-hover-dark;
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 {
2023-04-23 21:23:45 +05:30
@include line-number-hover-dark;
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: $dark-expanded-bg;
border-color: $dark-expanded-bg;
}
}
2015-04-26 12:48:37 +05:30
}
2021-03-08 18:12:59 +05:30
@include conflict-colors('dark');
2015-04-26 12:48:37 +05:30
// highlight line via anchor
pre .hll {
2017-08-17 22:00:37 +05:30
background-color: $dark-pre-hll-bg !important;
2015-04-26 12:48:37 +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: $dark-highlight-bg !important;
color: $dark-highlight-color !important;
2015-09-25 12:07:36 +05:30
}
2015-04-26 12:48:37 +05:30
2017-09-10 17:25:29 +05:30
// Links to URLs, emails, or dependencies
.line a {
color: $dark-na;
}
2017-08-17 22:00:37 +05:30
.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 */
2022-04-04 11:22:00 +05:30
.cd { color: $dark-cd; } /* Comment.Doc */
2017-08-17 22:00:37 +05:30
.gd { color: $dark-gd; } /* Generic.Deleted */
2016-11-03 12:29:30 +05:30
.ge { font-style: italic; } /* Generic.Emph */
2020-07-28 23:09:34 +05:30
.gh { /* Generic.Heading */
color: $dark-gh;
font-weight: $gl-font-weight-bold;
}
2017-08-17 22:00:37 +05:30
.gi { color: $dark-gi; } /* Generic.Inserted */
2020-07-28 23:09:34 +05:30
.gp { /* Generic.Prompt */
color: $dark-gp;
font-weight: $gl-font-weight-bold;
}
2018-03-17 18:26:18 +05:30
.gs { font-weight: $gl-font-weight-bold; } /* Generic.Strong */
2020-07-28 23:09:34 +05:30
.gu { /* Generic.Subheading */
color: $dark-gu;
font-weight: $gl-font-weight-bold;
}
2017-08-17 22:00:37 +05:30
.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 */
2014-09-02 18:07:02 +05:30
}