debian-mirror-gitlab/app/assets/stylesheets/highlight/white_base.scss

429 lines
8.1 KiB
SCSS
Raw Normal View History

2018-10-15 14:42:47 +05:30
/* https://github.com/aahan/pygments-github-style */
2019-07-07 11:18:12 +05:30
@import './common';
2018-10-15 14:42:47 +05:30
/*
* White Syntax Colors
*/
$white-code-color: $gl-text-color;
$white-highlight: #fafe3d;
$white-pre-hll-bg: #f8eec7;
$white-hll-bg: #f8f8f8;
$white-expanded-border: #e0e0e0;
$white-expanded-bg: #f7f7f7;
$white-c: #998;
$white-err: #a61717;
$white-err-bg: #e3d2d2;
$white-cm: #998;
$white-cp: #999;
$white-c1: #998;
$white-cs: #999;
2022-04-04 11:22:00 +05:30
$white-cd: #998;
2018-10-15 14:42:47 +05:30
$white-gd: $black;
$white-gd-bg: #fdd;
$white-gd-x: $black;
$white-gd-x-bg: #faa;
$white-gr: #a00;
2021-04-17 20:07:23 +05:30
$white-gh: #800080;
2018-10-15 14:42:47 +05:30
$white-gi: $black;
$white-gi-bg: #dfd;
$white-gi-x: $black;
$white-gi-x-bg: #afa;
$white-go: #888;
$white-gp: #555;
$white-gu: #800080;
$white-gt: #a00;
$white-kt: #458;
$white-m: #099;
$white-s: #d14;
$white-n: #333;
2019-07-07 11:18:12 +05:30
$white-na: #008080;
2018-10-15 14:42:47 +05:30
$white-nb: #0086b3;
$white-nc: #458;
2019-07-07 11:18:12 +05:30
$white-no: #008080;
$white-ni: #800080;
2018-10-15 14:42:47 +05:30
$white-ne: #900;
$white-nf: #900;
$white-nn: #555;
2019-07-07 11:18:12 +05:30
$white-nt: #000080;
$white-nv: #008080;
2018-10-15 14:42:47 +05:30
$white-w: #bbb;
$white-mf: #099;
$white-mh: #099;
$white-mi: #099;
$white-mo: #099;
$white-sb: #d14;
$white-sc: #d14;
$white-sd: #d14;
$white-s2: #d14;
$white-se: #d14;
$white-sh: #d14;
$white-si: #d14;
$white-sx: #d14;
$white-sr: #009926;
$white-s1: #d14;
$white-ss: #990073;
$white-bp: #999;
2019-07-07 11:18:12 +05:30
$white-vc: #008080;
$white-vg: #008080;
$white-vi: #008080;
2018-10-15 14:42:47 +05:30
$white-il: #099;
$white-gc-color: #999;
$white-gc-bg: #eaf2f5;
2019-07-07 11:18:12 +05:30
@mixin match-line {
2018-10-15 14:42:47 +05:30
color: $black-transparent;
background-color: $gray-light;
}
2022-07-16 23:28:13 +05:30
@mixin diff-match-line {
&.expansion {
&.match .diff-td {
color: $gray-400;
}
.diff-td {
background-color: $gray-50;
&:first-child {
border-color: $gray-100;
}
}
}
}
2019-07-07 11:18:12 +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($black, 'link');
}
.file-line-blame {
@include line-link($black, 'git');
}
.line-links {
@include line-hover-bg;
2021-04-29 21:17:54 +05:30
}
2018-10-15 14:42:47 +05:30
.line-numbers,
2022-01-26 12:08:38 +05:30
.diff-line-num,
.code-search-line {
2018-10-15 14:42:47 +05:30
background-color: $gray-light;
2021-03-08 18:12:59 +05:30
&.conflict_marker,
&.conflict_our {
background-color: map-get($conflict-colors, 'white-header-head-neutral');
border-color: map-get($conflict-colors, 'white-header-head-neutral');
}
&.conflict_their {
background-color: map-get($conflict-colors, 'white-header-origin-neutral');
border-color: map-get($conflict-colors, 'white-header-origin-neutral');
}
2018-10-15 14:42:47 +05:30
}
.diff-line-num,
.diff-line-num a {
2023-04-23 21:23:45 +05:30
color: $gray-400;
2018-10-15 14:42:47 +05:30
}
// Code itself
pre.code,
.diff-line-num {
2023-04-23 21:23:45 +05:30
border-color: rgba(0, 0, 0, 0.1);
2018-10-15 14:42:47 +05:30
}
&,
pre.code,
.line_holder .line_content {
2020-04-22 19:07:51 +05:30
background-color: $white;
2018-10-15 14:42:47 +05:30
color: $white-code-color;
}
2022-07-16 23:28:13 +05:30
.diff-line-expand-button {
@include diff-expansion($gray-100, $gray-700, $gray-200, $gray-800);
}
2018-10-15 14:42:47 +05:30
// Diff line
.line_holder {
2018-11-08 19:23:39 +05:30
&.match .line_content,
.new-nonewline.line_content,
.old-nonewline.line_content {
2019-07-07 11:18:12 +05:30
@include match-line;
2018-10-15 14:42:47 +05:30
}
2022-07-16 23:28:13 +05:30
&.diff-grid-row {
2022-11-25 23:54:43 +05:30
--diff-expansion-background-color: #{$gray-100};
2022-07-16 23:28:13 +05:30
@include diff-match-line;
}
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-03-08 18:12:59 +05:30
.diff-line-num:not(.empty-cell):not(.conflict_marker_their):not(.conflict_marker_our) {
2022-01-26 12:08:38 +05:30
@include line-number-hover;
2021-01-29 00:20:46 +05:30
}
}
2018-10-15 14:42:47 +05:30
.diff-line-num {
2022-08-13 15:12:31 +05:30
&.old,
&.old-nomappinginraw {
2018-10-15 14:42:47 +05:30
background-color: $line-number-old;
a {
2023-04-23 21:23:45 +05:30
color: scale-color($gray-300, $red: -30%, $green: -30%, $blue: -30%);
2018-10-15 14:42:47 +05:30
}
}
2022-08-13 15:12:31 +05:30
&.new,
&.new-nomappinginraw {
2018-10-15 14:42:47 +05:30
background-color: $line-number-new;
a {
2023-04-23 21:23:45 +05:30
color: scale-color($gray-200, $red: -30%, $green: -30%, $blue: -30%);
2018-10-15 14:42:47 +05:30
}
}
&.is-over,
&.hll:not(.empty-cell).is-over {
2022-01-26 12:08:38 +05:30
@include line-number-hover;
2018-10-15 14:42:47 +05:30
}
2023-04-23 21:23:45 +05:30
&.hll {
2023-06-20 00:43:36 +05:30
--highlight-border-color: #{$blue-300};
background-color: $blue-50;
2018-10-15 14:42:47 +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,
2018-10-15 14:42:47 +05:30
> .line_content {
border-top: 1px solid $white-expanded-border;
}
}
&.diff-expanded {
> .diff-line-num,
2020-04-08 14:13:33 +05:30
> .line-coverage,
2018-10-15 14:42:47 +05:30
> .line_content {
background: $white-expanded-bg;
border-color: $white-expanded-bg;
}
}
.line_content {
2022-08-13 15:12:31 +05:30
&.old,
&.old-nomappinginraw {
2018-10-15 14:42:47 +05:30
background-color: $line-removed;
&::before {
color: scale-color($line-number-old, $red: -30%, $green: -30%, $blue: -30%);
}
span.idiff {
background-color: $line-removed-dark;
}
}
2022-08-13 15:12:31 +05:30
&.new,
&.new-nomappinginraw {
2018-10-15 14:42:47 +05:30
background-color: $line-added;
&::before {
color: scale-color($line-number-new, $red: -30%, $green: -30%, $blue: -30%);
}
span.idiff {
background-color: $line-added-dark;
}
}
&.match {
2019-07-07 11:18:12 +05:30
@include match-line;
2018-10-15 14:42:47 +05:30
}
2023-04-23 21:23:45 +05:30
&.hll {
2023-06-20 00:43:36 +05:30
--highlight-border-color: #{$blue-300};
background-color: $blue-50;
2018-10-15 14:42:47 +05:30
}
}
2020-04-08 14:13:33 +05:30
.line-coverage {
2021-03-08 18:12:59 +05:30
@include line-coverage-border-color($green-400, $red-400);
2021-09-04 01:27:46 +05:30
}
2020-04-08 14:13:33 +05:30
2021-09-04 01:27:46 +05:30
.line-coverage,
.line-codequality {
2022-08-13 15:12:31 +05:30
&.old,
&.old-nomappinginraw {
2020-04-08 14:13:33 +05:30
background-color: $line-removed;
}
2022-08-13 15:12:31 +05:30
&.new,
&.new-nomappinginraw {
2020-04-08 14:13:33 +05:30
background-color: $line-added;
}
2023-04-23 21:23:45 +05:30
&.hll {
2023-06-20 00:43:36 +05:30
--highlight-border-color: #{$blue-300};
background-color: $blue-50;
2020-04-08 14:13:33 +05:30
}
}
2018-10-15 14:42:47 +05:30
}
// highlight line via anchor
pre .hll {
background-color: $white-pre-hll-bg !important;
}
2019-07-07 11:18:12 +05:30
// Search result highlight
2018-10-15 14:42:47 +05:30
span.highlight_word {
background-color: $white-highlight !important;
}
2019-07-07 11:18:12 +05:30
// Links to URLs, emails, or dependencies
2018-10-15 14:42:47 +05:30
.line a {
color: $white-nb;
}
.hll { background-color: $white-hll-bg; }
2019-07-07 11:18:12 +05:30
2022-03-02 08:16:31 +05:30
.c,
.hljs-comment { color: $white-c;
2019-07-07 11:18:12 +05:30
font-style: italic; }
.err { color: $white-err;
background-color: $white-err-bg; }
2022-03-02 08:16:31 +05:30
.k,
.hljs-variable.language_,
.hljs-built_in { font-weight: $gl-font-weight-bold; }
2018-10-15 14:42:47 +05:30
.o { font-weight: $gl-font-weight-bold; }
2019-07-07 11:18:12 +05:30
.cm { color: $white-cm;
font-style: italic; }
2022-03-02 08:16:31 +05:30
.cp,
.hljs-meta { color: $white-cp;
2019-07-07 11:18:12 +05:30
font-weight: $gl-font-weight-bold; }
.c1 { color: $white-c1;
font-style: italic; }
.cs { color: $white-cs;
font-weight: $gl-font-weight-bold;
font-style: italic; }
2018-10-15 14:42:47 +05:30
2022-04-04 11:22:00 +05:30
.cd { color: $white-cd;
font-style: italic; }
2018-10-15 14:42:47 +05:30
.gd {
color: $white-gd;
background-color: $white-gd-bg;
.x {
color: $white-gd-x;
background-color: $white-gd-x-bg;
}
}
.ge { font-style: italic; }
.gr { color: $white-gr; }
2021-04-17 20:07:23 +05:30
.gh { color: $white-gh;
font-weight: $gl-font-weight-bold; }
2018-10-15 14:42:47 +05:30
.gi {
color: $white-gi;
background-color: $white-gi-bg;
.x {
color: $white-gi-x;
background-color: $white-gi-x-bg;
}
}
.go { color: $white-go; }
.gp { color: $white-gp; }
.gs { font-weight: $gl-font-weight-bold; }
2019-07-07 11:18:12 +05:30
.gu { color: $white-gu;
font-weight: $gl-font-weight-bold; }
2018-10-15 14:42:47 +05:30
.gt { color: $white-gt; }
.kc { font-weight: $gl-font-weight-bold; }
2022-03-02 08:16:31 +05:30
.kd,
.hljs-keyword { font-weight: $gl-font-weight-bold; }
2018-10-15 14:42:47 +05:30
.kn { font-weight: $gl-font-weight-bold; }
.kp { font-weight: $gl-font-weight-bold; }
.kr { font-weight: $gl-font-weight-bold; }
2019-07-07 11:18:12 +05:30
2022-03-02 08:16:31 +05:30
.kt,
.hljs-type { color: $white-kt;
2019-07-07 11:18:12 +05:30
font-weight: $gl-font-weight-bold; }
2018-10-15 14:42:47 +05:30
.m { color: $white-m; }
.s { color: $white-s; }
2019-07-07 11:18:12 +05:30
2022-03-02 08:16:31 +05:30
.n,
.hljs-built_in { color: $white-n; }
.na,
.hljs-attr,
.hljs-property,
.hljs-title.function_ { color: $white-na; }
.nb,
.hljs-title.class_,
.hljs-literal { color: $white-nb; }
.nc,
.hljs-title.class_,
.hljs-built_in { color: $white-nc;
2019-07-07 11:18:12 +05:30
font-weight: $gl-font-weight-bold; }
2018-10-15 14:42:47 +05:30
.no { color: $white-no; }
.ni { color: $white-ni; }
2019-07-07 11:18:12 +05:30
.ne { color: $white-ne;
font-weight: $gl-font-weight-bold; }
2022-03-02 08:16:31 +05:30
.nf,
.hljs-title,
.hljs-title.function_ { color: $white-nf;
2019-07-07 11:18:12 +05:30
font-weight: $gl-font-weight-bold; }
2018-10-15 14:42:47 +05:30
.nn { color: $white-nn; }
.nt { color: $white-nt; }
.nv { color: $white-nv; }
.ow { font-weight: $gl-font-weight-bold; }
.w { color: $white-w; }
.mf { color: $white-mf; }
.mh { color: $white-mh; }
2022-03-02 08:16:31 +05:30
.mi,
.hljs-number { color: $white-mi; }
2018-10-15 14:42:47 +05:30
.mo { color: $white-mo; }
.sb { color: $white-sb; }
.sc { color: $white-sc; }
.sd { color: $white-sd; }
.s2 { color: $white-s2; }
.se { color: $white-se; }
.sh { color: $white-sh; }
.si { color: $white-si; }
.sx { color: $white-sx; }
.sr { color: $white-sr; }
2022-03-02 08:16:31 +05:30
.s1,
.hljs-string { color: $white-s1; }
2018-10-15 14:42:47 +05:30
.ss { color: $white-ss; }
.bp { color: $white-bp; }
.vc { color: $white-vc; }
.vg { color: $white-vg; }
.vi { color: $white-vi; }
.il { color: $white-il; }
2019-07-07 11:18:12 +05:30
.gc { color: $white-gc-color;
background-color: $white-gc-bg; }