0
Fork 0
mirror of https://projects.blender.org/infrastructure/gitea-custom.git synced 2024-12-22 07:13:09 -05:00

UI: Adjust code diff syntax highlight colors

This commit is contained in:
Pablo Vazquez 2023-01-26 17:59:49 +01:00
parent 1238dea7d2
commit d3707e9983

View file

@ -109,14 +109,18 @@
--color-gold: hsl(47.3, 50%, 46.3%); --color-gold: hsl(47.3, 50%, 46.3%);
/* Color: diff */ /* Color: diff */
--color-diff-removed-word-bg: hsl(0, 37%, 31.8%);
--color-diff-added-word-bg: hsl(120, 25.5%, 31.6%); --color-diff-added-word-bg: hsl(120, 25.5%, 31.6%);
--color-diff-removed-row-bg: hsl(0, 22.4%, 19%); --color-diff-removed-word-bg: hsl(0, 37%, 31.8%);
--color-diff-moved-row-bg: hsl(59, 31%, 38.6%);
--color-diff-added-row-bg: hsl(133.6, 21.6%, 20%); --color-diff-added-row-bg: hsla(123, 36%, 43%, 0.1);
--color-diff-removed-row-border: hsl(0, 19%, 32.5%); --color-diff-added-row-linesnum-bg: hsla(123, 36%, 43%, 0.3);
--color-diff-moved-row-border: hsl(69.2, 46%, 61.4%);
--color-diff-added-row-border: hsl(134.4, 20%, 24%); --color-diff-added-row-border: hsl(134.4, 20%, 24%);
--color-diff-removed-row-bg: hsl(0, 20%, 20%);
--color-diff-removed-row-linesnum-bg: hsl(0, 30%, 30%);
--color-diff-removed-row-border: hsl(0, 19%, 32.5%);
--color-diff-moved-row-bg: hsl(59, 31%, 38.6%);
--color-diff-moved-row-border: hsl(69.2, 46%, 61.4%);
--color-diff-inactive: hsl(229.4, 13.8%, 24%); --color-diff-inactive: hsl(229.4, 13.8%, 24%);
/* Color: messages and status. */ /* Color: messages and status. */
@ -139,7 +143,7 @@
--color-box-header: hsl(213, 12%, 22%); --color-box-header: hsl(213, 12%, 22%);
--color-box-body: hsl(213, 12%, 18%); --color-box-body: hsl(213, 12%, 18%);
--color-box-body-highlight: hsl(213, 12%, 30%); --color-box-body-highlight: hsla(204deg, 60%, 36%, .15);
--color-text: hsl(220, 12.4%, 76.3%); --color-text: hsl(220, 12.4%, 76.3%);
--color-text-dark: hsl(220, 26%, 89%); --color-text-dark: hsl(220, 26%, 89%);
@ -164,7 +168,7 @@
--color-markup-table-row: hsla(0, 0%, 100%, 0); --color-markup-table-row: hsla(0, 0%, 100%, 0);
--color-markup-code-block: hsla(0, 0%, 100%, 0.1); --color-markup-code-block: hsla(0, 0%, 100%, 0.1);
--color-code-bg: hsl(213, 16%, 20%); --color-code-bg: hsl(213, 16%, 14%);
--color-code-sidebar-bg: hsl(213, 14.8%, 21%); --color-code-sidebar-bg: hsl(213, 14.8%, 21%);
--color-timeline: hsl(220, 10.6%, 33.3%); --color-timeline: hsl(220, 10.6%, 33.3%);
@ -286,6 +290,7 @@
.ui.tabular.menu .item { .ui.tabular.menu .item {
border: none; border: none;
border-bottom: 3px solid transparent; border-bottom: 3px solid transparent;
border-radius: 0;
transition: border-bottom-color var(--transition-speed) ease-in-out, color var(--transition-speed) ease-in-out; transition: border-bottom-color var(--transition-speed) ease-in-out, color var(--transition-speed) ease-in-out;
} }
@ -343,6 +348,10 @@
color: var(--color-text); color: var(--color-text);
} }
.repository .repo-title .repo-icon svg {
max-width: 22px;
}
.repository .ui.table a { .repository .ui.table a {
color: var(--color-text); color: var(--color-text);
} }
@ -424,77 +433,175 @@ footer a {
filter: invert(100%) hue-rotate(180deg); filter: invert(100%) hue-rotate(180deg);
} }
/* Code syntax highlighting. */
.tag-code .code-inner {
opacity: .5;
}
.same-code .lines-num.lines-num-old,
.same-code .lines-num.lines-num-new {
color: var(--color-text-light-3) !important;
}
.add-code .lines-num.lines-num-old,
.add-code .lines-num.lines-num-new {
background-color: var(--color-diff-added-row-linesnum-bg);
color: var(--color-text-dark) !important;
}
.del-code .lines-num.lines-num-old,
.diff-unified .del-code .lines-num.lines-num-old,
.del-code .lines-num.lines-num-new {
background-color: var(--color-diff-removed-row-linesnum-bg);
color: var(--color-text-dark) !important;
}
/* From web_src/less/themes/chroma/dark.less */ /* From web_src/less/themes/chroma/dark.less */
.chroma .bp { color: #fabd2f; } /* NameBuiltinPseudo */ :root {
.chroma .c { color: #777e94; } /* Comment */ --color-syntax-NameBuiltinPseudo: #fabd2f;
.chroma .c1 { color: #777e94; } /* CommentSingle */ --color-syntax-Comment: #777e94;
.chroma .ch { color: #777e94; } /* CommentHashbang */ --color-syntax-CommentSingle: #777e94;
.chroma .cm { color: #777e94; } /* CommentMultiline */ --color-syntax-CommentHashbang: #777e94;
.chroma .cp { color: #8ec07c; } /* CommentPreproc */ --color-syntax-CommentMultiline: #777e94;
.chroma .cpf { color: #649bc4; } /* CommentPreprocFile */ --color-syntax-CommentPreproc: #8ec07c;
.chroma .cs { color: #9075cd; } /* CommentSpecial */ --color-syntax-CommentPreprocFile: #649bc4;
.chroma .dl { color: #649bc4; } /* LiteralStringDelimiter */ --color-syntax-CommentSpecial: #9075cd;
.chroma .gd { color: #ffffff; background-color: #5f3737; } /* GenericDeleted */ --color-syntax-LiteralStringDelimiter: #649bc4;
.chroma .ge { color: #ddee30; } /* GenericEmph */
.chroma .gh { color: #ffaa10; } /* GenericHeading */ --color-syntax-GenericDeleted-text: #fff;
.chroma .gi { color: #ffffff; background-color: #3a523a; } /* GenericInserted */ --color-syntax-GenericDeleted-bg: #5f3737;
.chroma .go { color: #777e94; } /* GenericOutput */ --color-syntax-GenericEmph: #ddee30;
.chroma .gp { color: #ebdbb2; } /* GenericPrompt */ --color-syntax-GenericHeading: #ffaa10;
.chroma .gr { color: #ff4433; } /* GenericError */ --color-syntax-GenericInserted: #3a523a;
.chroma .gs { color: #ebdbb2; } /* GenericStrong */ --color-syntax-GenericOutput: #777e94;
.chroma .gt { color: #ff7540; } /* GenericTraceback */ --color-syntax-GenericPrompt: #ebdbb2;
.chroma .gu { color: #b8bb26; } /* GenericSubheading */ --color-syntax-GenericError: #ff4433;
.chroma .hl { background-color: #3f424d; } /* LineHighlight */ --color-syntax-GenericStrong: #ebdbb2;
.chroma .il { color: #649bc4; } /* LiteralNumberIntegerLong */ --color-syntax-GenericTraceback: #ff7540;
.chroma .k { color: #ff7540; } /* Keyword */ --color-syntax-GenericSubheading: #b8bb26;
.chroma .kc { color: #649bc4; } /* KeywordConstant */ --color-syntax-LineHighlight: #3f424d;
.chroma .kd { color: #ff7540; } /* KeywordDeclaration */ --color-syntax-LiteralNumberIntegerLong: #649bc4;
.chroma .kn { color: #ffaa10; } /* KeywordNamespace */ --color-syntax-Keyword: #f47067;
.chroma .kp { color: #5f8700; } /* KeywordPseudo */ --color-syntax-KeywordConstant: #649bc4;
.chroma .kr { color: #ff7540; } /* KeywordReserved */ --color-syntax-KeywordDeclaration: #ff7540;
.chroma .kt { color: #fabd2f; } /* KeywordType */ --color-syntax-KeywordNamespace: #ffaa10;
.chroma .ln { color: #7f8699; } /* LineNumbers */ --color-syntax-KeywordPseudo: #5f8700;
.chroma .lnt { color: #7f8699; } /* LineNumbersTable */ --color-syntax-KeywordReserved: #ff7540;
.chroma .m { color: #649bc4; } /* LiteralNumber */ --color-syntax-KeywordType: #fabd2f;
.chroma .mb { color: #649bc4; } /* LiteralNumberBin */ --color-syntax-LineNumbers: #7f8699;
.chroma .mf { color: #649bc4; } /* LiteralNumberFloat */ --color-syntax-LineNumbersTable: #7f8699;
.chroma .mh { color: #649bc4; } /* LiteralNumberHex */ --color-syntax-LiteralNumber: #649bc4;
.chroma .mi { color: #649bc4; } /* LiteralNumberInteger */ --color-syntax-LiteralNumberBin: #649bc4;
.chroma .mo { color: #649bc4; } /* LiteralNumberOct */ --color-syntax-LiteralNumberFloat: #649bc4;
.chroma .n { color: #fabd2f; } /* Name */ --color-syntax-LiteralNumberHex: #649bc4;
.chroma .na { color: #b8bb26; } /* NameAttribute */ --color-syntax-LiteralNumberInteger: #649bc4;
.chroma .nb { color: #fabd2f; } /* NameBuiltin */ --color-syntax-LiteralNumberOct: #649bc4;
.chroma .nc { color: #ffaa10; } /* NameClass */ --color-syntax-Name: #adbac7;
.chroma .nd { color: #8ec07c; } /* NameDecorator */ --color-syntax-NameAttribute: #b8bb26;
.chroma .ne { color: #ff7540; } /* NameException */ --color-syntax-NameBuiltin: #fabd2f;
.chroma .nf { color: #fabd2f; } /* NameFunction */ --color-syntax-NameClass: #f69d50;
.chroma .ni { color: #fabd2f; } /* NameEntity */ --color-syntax-NameDecorator: #dcbdfb;
.chroma .nl { color: #ff7540; } /* NameLabel */ --color-syntax-NameException: #ff7540;
.chroma .nn { color: #ffaa10; } /* NameNamespace */ --color-syntax-NameFunction: #dcbdfb;
.chroma .no { color: #649bc4; } /* NameConstant */ --color-syntax-NameEntity: #fabd2f;
.chroma .nt { color: #ff7540; } /* NameTag */ --color-syntax-NameLabel: #ff7540;
.chroma .nv { color: #ebdbb2; } /* NameVariable */ --color-syntax-NameNamespace: #ffaa10;
.chroma .nx { color: #b6bac5; } /* NameOther */ --color-syntax-NameConstant: #649bc4;
.chroma .o { color: #ff7540; } /* Operator */ --color-syntax-NameTag: #ff7540;
.chroma .ow { color: #5f8700; } /* OperatorWord */ --color-syntax-NameVariable: #ebdbb2;
.chroma .p { color: #d2d4db; } /* Punctuation */ --color-syntax-NameOther: #b6bac5;
.chroma .s { color: #b8bb26; } /* LiteralString */ --color-syntax-Operator: #6cb6ff;
.chroma .s1 { color: #b8bb26; } /* LiteralStringSingle */ --color-syntax-OperatorWord: #6cb6ff;
.chroma .s2 { color: #b8bb26; } /* LiteralStringDouble */ --color-syntax-Punctuation: #d2d4db;
.chroma .sa { color: #649bc4; } /* LiteralStringAffix */ --color-syntax-LiteralString: #b8bb26;
.chroma .sb { color: #b8bb26; } /* LiteralStringBacktick */ --color-syntax-LiteralStringSingle: #96d0ff;
.chroma .sc { color: #649bc4; } /* LiteralStringChar */ --color-syntax-LiteralStringDouble: #96d0ff;
.chroma .sd { color: #777e94; } /* LiteralStringDoc */ --color-syntax-LiteralStringAffix: #649bc4;
.chroma .se { color: #ff7540; } /* LiteralStringEscape */ --color-syntax-LiteralStringBacktick: #b8bb26;
.chroma .sh { color: #649bc4; } /* LiteralStringHeredoc */ --color-syntax-LiteralStringChar: #649bc4;
.chroma .si { color: #ffaa10; } /* LiteralStringInterpol */ --color-syntax-LiteralStringDoc: #777e94;
.chroma .sr { color: #9075cd; } /* LiteralStringRegex */ --color-syntax-LiteralStringEscape: #ff7540;
.chroma .ss { color: #ff7540; } /* LiteralStringSymbol */ --color-syntax-LiteralStringHeredoc: #649bc4;
.chroma .sx { color: #ffaa10; } /* LiteralStringOther */ --color-syntax-LiteralStringInterpol: #ffaa10;
.chroma .vc { color: #ff7540; } /* NameVariableClass */ --color-syntax-LiteralStringRegex: #9075cd;
.chroma .vg { color: #ffaa10; } /* NameVariableGlobal */ --color-syntax-LiteralStringSymbol: #ff7540;
.chroma .vi { color: #ffaa10; } /* NameVariableInstance */ --color-syntax-LiteralStringOther: #ffaa10;
.chroma .w { color: #7f8699; } /* TextWhitespace */ --color-syntax-NameVariableClass: #ff7540;
--color-syntax-NameVariableGlobal: #ffaa10;
--color-syntax-NameVariableInstance: #ffaa10;
--color-syntax-TextWhitespace: #7f8699;
}
.chroma .bp { color: var(--color-syntax-NameBuiltinPseudo) } /* NameBuiltinPseudo */
.chroma .c { color: var(--color-syntax-Comment) } /* Comment */
.chroma .c1 { color: var(--color-syntax-CommentSingle) } /* CommentSingle */
.chroma .ch { color: var(--color-syntax-CommentHashbang) } /* CommentHashbang */
.chroma .cm { color: var(--color-syntax-CommentMultiline) } /* CommentMultiline */
.chroma .cp { color: var(--color-syntax-CommentPreproc) } /* CommentPreproc */
.chroma .cpf { color: var(--color-syntax-CommentPreprocFile) } /* CommentPreprocFile */
.chroma .cs { color: var(--color-syntax-CommentSpecial) } /* CommentSpecial */
.chroma .dl { color: var(--color-syntax-LiteralStringDelimiter) } /* LiteralStringDelimiter */
.chroma .gd { color: var(--color-syntax-GenericDeleted-text); background-color: var(--color-syntax-GenericDeleted-bg); } /* GenericDeleted */
.chroma .ge { color: var(--color-syntax-GenericEmph); } /* GenericEmph */
.chroma .gh { color: var(--color-syntax-GenericHeading); } /* GenericHeading */
.chroma .gi { color: var(--color-syntax-GenericInserted-text); background-color: var(--color-syntax-GenericInserted-bg); } /* GenericInserted */
.chroma .go { color: var(--color-syntax-GenericOutput); } /* GenericOutput */
.chroma .gp { color: var(--color-syntax-GenericPrompt); } /* GenericPrompt */
.chroma .gr { color: var(--color-syntax-GenericError); } /* GenericError */
.chroma .gs { color: var(--color-syntax-GenericStrong); } /* GenericStrong */
.chroma .gt { color: var(--color-syntax-GenericTraceback); } /* GenericTraceback */
.chroma .gu { color: var(--color-syntax-GenericSubheading); } /* GenericSubheading */
.chroma .hl { background-color: var(--color-syntax-LineHighlight); } /* LineHighlight */
.chroma .il { color: var(--color-syntax-LiteralNumberIntegerLong); } /* LiteralNumberIntegerLong */
.chroma .k { color: var(--color-syntax-Keyword); } /* Keyword */
.chroma .kc { color: var(--color-syntax-KeywordConstant); } /* KeywordConstant */
.chroma .kd { color: var(--color-syntax-KeywordDeclaration); } /* KeywordDeclaration */
.chroma .kn { color: var(--color-syntax-KeywordNamespace); } /* KeywordNamespace */
.chroma .kp { color: var(--color-syntax-KeywordPseudo); } /* KeywordPseudo */
.chroma .kr { color: var(--color-syntax-KeywordReserved); } /* KeywordReserved */
.chroma .kt { color: var(--color-syntax-KeywordType); } /* KeywordType */
.chroma .ln { color: var(--color-syntax-LineNumbers); } /* LineNumbers */
.chroma .lnt { color: var(--color-syntax-LineNumbersTable); } /* LineNumbersTable */
.chroma .m { color: var(--color-syntax-LiteralNumber); } /* LiteralNumber */
.chroma .mb { color: var(--color-syntax-LiteralNumberBin); } /* LiteralNumberBin */
.chroma .mf { color: var(--color-syntax-LiteralNumberFloat); } /* LiteralNumberFloat */
.chroma .mh { color: var(--color-syntax-LiteralNumberHex); } /* LiteralNumberHex */
.chroma .mi { color: var(--color-syntax-LiteralNumberInteger); } /* LiteralNumberInteger */
.chroma .mo { color: var(--color-syntax-LiteralNumberOct); } /* LiteralNumberOct */
.chroma .n { color: var(--color-syntax-Name); } /* Name */
.chroma .na { color: var(--color-syntax-NameAttribute); } /* NameAttribute */
.chroma .nb { color: var(--color-syntax-NameBuiltin); } /* NameBuiltin */
.chroma .nc { color: var(--color-syntax-NameClass); } /* NameClass */
.chroma .nd { color: var(--color-syntax-NameDecorator); } /* NameDecorator */
.chroma .ne { color: var(--color-syntax-NameException); } /* NameException */
.chroma .nf { color: var(--color-syntax-NameFunction); } /* NameFunction */
.chroma .ni { color: var(--color-syntax-NameEntity); } /* NameEntity */
.chroma .nl { color: var(--color-syntax-NameLabel); } /* NameLabel */
.chroma .nn { color: var(--color-syntax-NameNamespace); } /* NameNamespace */
.chroma .no { color: var(--color-syntax-NameConstant); } /* NameConstant */
.chroma .nt { color: var(--color-syntax-NameTag); } /* NameTag */
.chroma .nv { color: var(--color-syntax-NameVariable); } /* NameVariable */
.chroma .nx { color: var(--color-syntax-NameOther); } /* NameOther */
.chroma .o { color: var(--color-syntax-Operator); } /* Operator */
.chroma .ow { color: var(--color-syntax-OperatorWord); } /* OperatorWord */
.chroma .p { color: var(--color-syntax-Punctuation); } /* Punctuation */
.chroma .s { color: var(--color-syntax-LiteralString); } /* LiteralString */
.chroma .s1 { color: var(--color-syntax-LiteralStringSingle); } /* LiteralStringSingle */
.chroma .s2 { color: var(--color-syntax-LiteralStringDouble); } /* LiteralStringDouble */
.chroma .sa { color: var(--color-syntax-LiteralStringAffix); } /* LiteralStringAffix */
.chroma .sb { color: var(--color-syntax-LiteralStringBacktick); } /* LiteralStringBacktick */
.chroma .sc { color: var(--color-syntax-LiteralStringChar); } /* LiteralStringChar */
.chroma .sd { color: var(--color-syntax-LiteralStringDoc); } /* LiteralStringDoc */
.chroma .se { color: var(--color-syntax-LiteralStringEscape); } /* LiteralStringEscape */
.chroma .sh { color: var(--color-syntax-LiteralStringHeredoc); } /* LiteralStringHeredoc */
.chroma .si { color: var(--color-syntax-LiteralStringInterpol); } /* LiteralStringInterpol */
.chroma .sr { color: var(--color-syntax-LiteralStringRegex); } /* LiteralStringRegex */
.chroma .ss { color: var(--color-syntax-LiteralStringSymbol); } /* LiteralStringSymbol */
.chroma .sx { color: var(--color-syntax-LiteralStringOther); } /* LiteralStringOther */
.chroma .vc { color: var(--color-syntax-NameVariableClass); } /* NameVariableClass */
.chroma .vg { color: var(--color-syntax-NameVariableGlobal); } /* NameVariableGlobal */
.chroma .vi { color: var(--color-syntax-NameVariableInstance); } /* NameVariableInstance */
.chroma .w { color: var(--color-syntax-TextWhitespace); } /* TextWhitespace */
/* From web_src/less/codemirror/dark.less */ /* From web_src/less/codemirror/dark.less */
.CodeMirror.cm-s-default .cm-property, .CodeMirror.cm-s-paper .cm-property { .CodeMirror.cm-s-default .cm-property, .CodeMirror.cm-s-paper .cm-property {