2020-12-11 22:08:47 +05:30
|
|
|
@import "../chroma/dark.less";
|
2021-12-21 01:37:49 +05:30
|
|
|
@import "../codemirror/dark.less";
|
2020-11-17 11:03:19 +05:30
|
|
|
|
2020-10-31 09:22:10 +05:30
|
|
|
:root {
|
2021-11-25 12:44:48 +05:30
|
|
|
--is-dark-theme: true;
|
2020-10-31 09:22:10 +05:30
|
|
|
--color-primary: #87ab63;
|
2022-10-23 09:35:20 +05:30
|
|
|
--color-primary-contrast: #ffffff;
|
2020-10-31 09:22:10 +05:30
|
|
|
--color-primary-dark-1: #93b373;
|
|
|
|
--color-primary-dark-2: #9fbc82;
|
|
|
|
--color-primary-dark-3: #abc492;
|
|
|
|
--color-primary-dark-4: #b7cda1;
|
|
|
|
--color-primary-dark-5: #cfddc1;
|
|
|
|
--color-primary-dark-6: #e7eee0;
|
|
|
|
--color-primary-dark-7: #f8faf6;
|
|
|
|
--color-primary-light-1: #7a9e55;
|
|
|
|
--color-primary-light-2: #6c8c4c;
|
|
|
|
--color-primary-light-3: #5f7b42;
|
|
|
|
--color-primary-light-4: #516939;
|
|
|
|
--color-primary-light-5: #364626;
|
|
|
|
--color-primary-light-6: #1b2313;
|
|
|
|
--color-primary-light-7: #080b06;
|
2020-10-31 17:47:32 +05:30
|
|
|
--color-primary-alpha-10: #87ab6319;
|
|
|
|
--color-primary-alpha-20: #87ab6333;
|
|
|
|
--color-primary-alpha-30: #87ab634b;
|
|
|
|
--color-primary-alpha-40: #87ab6366;
|
|
|
|
--color-primary-alpha-50: #87ab6380;
|
|
|
|
--color-primary-alpha-60: #87ab6399;
|
|
|
|
--color-primary-alpha-70: #87ab63b3;
|
|
|
|
--color-primary-alpha-80: #87ab63cc;
|
|
|
|
--color-primary-alpha-90: #87ab63e1;
|
2020-11-02 01:34:26 +05:30
|
|
|
--color-secondary: #454a57;
|
2020-11-08 02:34:40 +05:30
|
|
|
--color-secondary-dark-1: #505665;
|
|
|
|
--color-secondary-dark-2: #5b6273;
|
|
|
|
--color-secondary-dark-3: #71798e;
|
|
|
|
--color-secondary-dark-4: #7f8699;
|
|
|
|
--color-secondary-dark-5: #8c93a4;
|
|
|
|
--color-secondary-dark-6: #9aa0af;
|
|
|
|
--color-secondary-dark-7: #a8adba;
|
2021-03-22 09:34:19 +05:30
|
|
|
--color-secondary-dark-8: #b6bac5;
|
|
|
|
--color-secondary-dark-9: #c4c7d0;
|
|
|
|
--color-secondary-dark-10: #d2d4db;
|
|
|
|
--color-secondary-dark-11: #dfe1e6;
|
|
|
|
--color-secondary-dark-12: #edeef1;
|
|
|
|
--color-secondary-dark-13: #fbfbfc;
|
2020-11-08 02:34:40 +05:30
|
|
|
--color-secondary-light-1: #373b46;
|
|
|
|
--color-secondary-light-2: #292c34;
|
|
|
|
--color-secondary-light-3: #1c1e23;
|
|
|
|
--color-secondary-light-4: #0e0f11;
|
|
|
|
--color-secondary-alpha-10: #454a5719;
|
|
|
|
--color-secondary-alpha-20: #454a5733;
|
|
|
|
--color-secondary-alpha-30: #454a574b;
|
|
|
|
--color-secondary-alpha-40: #454a5766;
|
|
|
|
--color-secondary-alpha-50: #454a5780;
|
|
|
|
--color-secondary-alpha-60: #454a5799;
|
|
|
|
--color-secondary-alpha-70: #454a57b3;
|
|
|
|
--color-secondary-alpha-80: #454a57cc;
|
|
|
|
--color-secondary-alpha-90: #454a57e1;
|
2020-11-16 02:28:16 +05:30
|
|
|
/* colors */
|
2022-11-12 20:00:52 +05:30
|
|
|
--color-red: #cc4848;
|
2022-10-25 09:38:54 +05:30
|
|
|
--color-orange: #cc580c;
|
|
|
|
--color-yellow: #cc9903;
|
|
|
|
--color-olive: #91a313;
|
|
|
|
--color-green: #87ab63;
|
|
|
|
--color-teal: #00918a;
|
2022-11-12 20:00:52 +05:30
|
|
|
--color-blue: #3a8ac6;
|
|
|
|
--color-violet: #906ae1;
|
|
|
|
--color-purple: #b259d0;
|
|
|
|
--color-pink: #d22e8b;
|
|
|
|
--color-brown: #a47252;
|
2022-11-19 09:32:30 +05:30
|
|
|
--color-grey: #9ea2aa;
|
|
|
|
--color-black: #1e222e;
|
|
|
|
/* light variants - produced via Sass scale-color(color, $lightness: -10%) */
|
2022-11-12 20:00:52 +05:30
|
|
|
--color-red-light: #c23636;
|
|
|
|
--color-orange-light: #b84f0b;
|
|
|
|
--color-yellow-light: #b88a03;
|
|
|
|
--color-olive-light: #839311;
|
|
|
|
--color-green-light: #7a9e55;
|
|
|
|
--color-teal-light: #00837c;
|
|
|
|
--color-blue-light: #347cb3;
|
|
|
|
--color-violet-light: #7b4edb;
|
|
|
|
--color-purple-light: #a742c9;
|
|
|
|
--color-pink-light: #be297d;
|
|
|
|
--color-brown-light: #94674a;
|
2022-11-19 09:32:30 +05:30
|
|
|
--color-grey-light: #8d919b;
|
|
|
|
--color-black-light: #1b1f29;
|
2022-10-25 09:38:54 +05:30
|
|
|
/* other colors */
|
2022-11-12 20:00:52 +05:30
|
|
|
--color-gold: #b1983b;
|
2020-11-16 02:28:16 +05:30
|
|
|
--color-white: #ffffff;
|
2020-12-17 21:22:58 +05:30
|
|
|
--color-diff-removed-word-bg: #6f3333;
|
|
|
|
--color-diff-added-word-bg: #3c653c;
|
|
|
|
--color-diff-removed-row-bg: #3c2626;
|
Prevent NPE in CSV diff rendering when column removed (#17018)
Fixes #16837 if a column is deleted.
We were clobbering the columns that were added by looping through the aline (base) and then when bline (head) was looped through, it clobbered what was in the "cells" array that is show in the diff, and then left a nil cell because nothing was shifted.
This fix properly shifts the cells, and properly puts the b cell either at its location or after, according to what the aline placed in the cells.
This includes test, adding a new test function since adding/removing cells works best with three columns, not two, which results in 4 columns of the resulting cells because it has a deleted column and an added column. If you try this locally, you can try those cases and others, such as adding a column.
There was no need to do anything special for the rows when `aline == 0 || bline == 0` so that was removed. This allows the same code to be used for removed or added lines, with the bcell text always being the RightCell, acell text being the LeftCell.
I still added the patch zeripath gave at https://github.com/go-gitea/gitea/issues/16837#issuecomment-913007382 so that just in case for some reason a cell is nil (which shouldn't happen now) it doesn't throw a 500 error, so the user can at least view the raw diff.
Also fixes in the [view.go](https://github.com/go-gitea/gitea/pull/17018/files#diff-43a7f4747c7ba8bff888c9be11affaafd595fd55d27f3333840eb19df9fad393L521) file how if a CSV file is empty (either created empty or if you edit it and remove all contents) it throws a huge 500 error when you then save it (when you view the file). Since we allow creating, saving and pushing empty files, we shouldn't throw an error on an empty CSV file, but just show its empty contents. This doesn't happen if it is a Markdown file or other type of file that is empty.
EDIT: Now handled in the markup/csv renderer code
2021-10-21 00:40:03 +05:30
|
|
|
--color-diff-moved-row-bg: #818044;
|
2020-12-17 21:22:58 +05:30
|
|
|
--color-diff-added-row-bg: #283e2d;
|
|
|
|
--color-diff-removed-row-border: #634343;
|
Prevent NPE in CSV diff rendering when column removed (#17018)
Fixes #16837 if a column is deleted.
We were clobbering the columns that were added by looping through the aline (base) and then when bline (head) was looped through, it clobbered what was in the "cells" array that is show in the diff, and then left a nil cell because nothing was shifted.
This fix properly shifts the cells, and properly puts the b cell either at its location or after, according to what the aline placed in the cells.
This includes test, adding a new test function since adding/removing cells works best with three columns, not two, which results in 4 columns of the resulting cells because it has a deleted column and an added column. If you try this locally, you can try those cases and others, such as adding a column.
There was no need to do anything special for the rows when `aline == 0 || bline == 0` so that was removed. This allows the same code to be used for removed or added lines, with the bcell text always being the RightCell, acell text being the LeftCell.
I still added the patch zeripath gave at https://github.com/go-gitea/gitea/issues/16837#issuecomment-913007382 so that just in case for some reason a cell is nil (which shouldn't happen now) it doesn't throw a 500 error, so the user can at least view the raw diff.
Also fixes in the [view.go](https://github.com/go-gitea/gitea/pull/17018/files#diff-43a7f4747c7ba8bff888c9be11affaafd595fd55d27f3333840eb19df9fad393L521) file how if a CSV file is empty (either created empty or if you edit it and remove all contents) it throws a huge 500 error when you then save it (when you view the file). Since we allow creating, saving and pushing empty files, we shouldn't throw an error on an empty CSV file, but just show its empty contents. This doesn't happen if it is a Markdown file or other type of file that is empty.
EDIT: Now handled in the markup/csv renderer code
2021-10-21 00:40:03 +05:30
|
|
|
--color-diff-moved-row-border: #bcca6f;
|
2020-12-17 21:22:58 +05:30
|
|
|
--color-diff-added-row-border: #314a37;
|
|
|
|
--color-diff-inactive: #353846;
|
2022-10-25 09:38:54 +05:30
|
|
|
--color-error-border: #a04141;
|
|
|
|
--color-error-bg: #522;
|
|
|
|
--color-error-text: #f9cbcb;
|
2021-12-01 05:10:17 +05:30
|
|
|
--color-success-border: #458a57;
|
2021-12-06 21:19:30 +05:30
|
|
|
--color-success-bg: #284034;
|
2021-12-01 05:10:17 +05:30
|
|
|
--color-success-text: #6cc664;
|
2021-12-06 21:19:30 +05:30
|
|
|
--color-warning-border: #bb9d00;
|
|
|
|
--color-warning-bg: #3a3a30;
|
2021-12-01 05:10:17 +05:30
|
|
|
--color-warning-text: #fbbd08;
|
2021-12-06 21:19:30 +05:30
|
|
|
--color-info-border: #306090;
|
|
|
|
--color-info-bg: #26354c;
|
|
|
|
--color-info-text: #38a8e8;
|
2022-11-23 05:52:27 +05:30
|
|
|
--color-red-badge: #db2828;
|
|
|
|
--color-red-badge-bg: #db28281a;
|
|
|
|
--color-red-badge-hover-bg: #db28284d;
|
|
|
|
--color-green-badge: #21ba45;
|
|
|
|
--color-green-badge-bg: #21ba451a;
|
|
|
|
--color-green-badge-hover-bg: #21ba454d;
|
|
|
|
--color-yellow-badge: #fbbd08;
|
|
|
|
--color-yellow-badge-bg: #fbbd081a;
|
|
|
|
--color-yellow-badge-hover-bg: #fbbd084d;
|
|
|
|
--color-orange-badge: #f2711c;
|
|
|
|
--color-orange-badge-bg: #f2711c1a;
|
|
|
|
--color-orange-badge-hover-bg: #f2711c4d;
|
|
|
|
--color-git: #f05133;
|
2020-11-16 02:28:16 +05:30
|
|
|
/* target-based colors */
|
2020-10-31 09:22:10 +05:30
|
|
|
--color-body: #383c4a;
|
2020-12-17 21:22:58 +05:30
|
|
|
--color-box-header: #404652;
|
2022-09-23 08:30:29 +05:30
|
|
|
--color-box-body: #2a2e3a;
|
2022-08-06 19:55:58 +05:30
|
|
|
--color-box-body-highlight: #353945;
|
2020-12-17 21:22:58 +05:30
|
|
|
--color-text-dark: #dbe0ea;
|
2020-11-27 01:03:28 +05:30
|
|
|
--color-text: #bbc0ca;
|
2020-12-04 16:48:37 +05:30
|
|
|
--color-text-light: #a6aab5;
|
2022-07-22 16:19:24 +05:30
|
|
|
--color-text-light-1: #979ba6;
|
2020-12-20 23:30:03 +05:30
|
|
|
--color-text-light-2: #8a8e99;
|
|
|
|
--color-text-light-3: #707687;
|
2020-11-29 11:52:04 +05:30
|
|
|
--color-footer: #2e323e;
|
2020-12-17 21:22:58 +05:30
|
|
|
--color-timeline: #4c525e;
|
2020-11-27 01:03:28 +05:30
|
|
|
--color-input-text: #d5dbe6;
|
2022-09-23 08:30:29 +05:30
|
|
|
--color-input-background: #232933;
|
2022-10-17 04:59:26 +05:30
|
|
|
--color-input-toggle-background: #454a57;
|
2020-11-12 21:29:33 +05:30
|
|
|
--color-input-border: #454a57;
|
|
|
|
--color-input-border-hover: #505667;
|
2020-11-27 01:03:28 +05:30
|
|
|
--color-navbar: #2a2e3a;
|
2021-12-25 03:12:01 +05:30
|
|
|
--color-navbar-transparent: #2a2e3a00;
|
2020-12-27 16:23:53 +05:30
|
|
|
--color-light: #00000028;
|
2021-06-28 13:51:43 +05:30
|
|
|
--color-light-mimic-enabled: rgba(0, 0, 0, calc(40 / 255 * 222 / 255 / var(--opacity-disabled)));
|
2020-12-27 16:23:53 +05:30
|
|
|
--color-light-border: #ffffff28;
|
2021-04-03 14:07:32 +05:30
|
|
|
--color-hover: #ffffff10;
|
|
|
|
--color-active: #ffffff16;
|
2020-11-29 11:52:04 +05:30
|
|
|
--color-menu: #2e323e;
|
2020-12-05 15:39:09 +05:30
|
|
|
--color-card: #2e323e;
|
2021-05-07 14:13:41 +05:30
|
|
|
--color-markup-table-row: #ffffff06;
|
2022-09-28 18:49:22 +05:30
|
|
|
--color-markup-code-block: #ffffff0d;
|
2020-11-29 21:22:11 +05:30
|
|
|
--color-button: #353846;
|
2020-12-04 16:48:37 +05:30
|
|
|
--color-code-bg: #2a2e3a;
|
2021-06-28 04:43:20 +05:30
|
|
|
--color-code-sidebar-bg: #2e323e;
|
2020-12-05 15:39:09 +05:30
|
|
|
--color-shadow: #00000060;
|
2020-12-10 08:29:05 +05:30
|
|
|
--color-secondary-bg: #2a2e3a;
|
2020-12-20 23:30:03 +05:30
|
|
|
--color-text-focus: #fff;
|
|
|
|
--color-expand-button: #3c404d;
|
2021-04-03 14:07:32 +05:30
|
|
|
--color-placeholder-text: #6a737d;
|
2021-04-08 15:23:00 +05:30
|
|
|
--color-editor-line-highlight: var(--color-primary-light-5);
|
2021-04-20 09:43:03 +05:30
|
|
|
--color-project-board-bg: var(--color-secondary-light-2);
|
2021-05-05 23:44:04 +05:30
|
|
|
--color-caret: var(--color-text); /* should ideally be --color-text-dark, see #15651 */
|
2021-05-12 11:46:22 +05:30
|
|
|
--color-reaction-bg: #ffffff12;
|
|
|
|
--color-reaction-active-bg: var(--color-primary-alpha-40);
|
2022-09-23 08:30:29 +05:30
|
|
|
--color-header-bar: #2e323e;
|
2022-09-28 18:49:22 +05:30
|
|
|
--color-label-active-bg: #4c525e;
|
2022-10-23 09:35:20 +05:30
|
|
|
--color-accent: var(--color-primary-light-1);
|
2022-10-07 15:18:03 +05:30
|
|
|
--color-small-accent: var(--color-primary-light-5);
|
2022-10-12 21:56:27 +05:30
|
|
|
--color-active-line: #534d1b;
|
2020-11-02 01:34:26 +05:30
|
|
|
|
2022-10-28 11:15:08 +05:30
|
|
|
accent-color: var(--color-accent);
|
|
|
|
color-scheme: dark;
|
2021-05-04 19:26:43 +05:30
|
|
|
}
|
|
|
|
|
2020-11-29 21:22:11 +05:30
|
|
|
/* invert emojis that are hard to read otherwise */
|
|
|
|
.emoji[aria-label="check mark"],
|
|
|
|
.emoji[aria-label="currency exchange"],
|
|
|
|
.emoji[aria-label="TOP arrow"],
|
|
|
|
.emoji[aria-label="END arrow"],
|
|
|
|
.emoji[aria-label="ON! arrow"],
|
|
|
|
.emoji[aria-label="SOON arrow"],
|
|
|
|
.emoji[aria-label="heavy dollar sign"],
|
|
|
|
.emoji[aria-label="copyright"],
|
|
|
|
.emoji[aria-label="registered"],
|
|
|
|
.emoji[aria-label="trade mark"],
|
|
|
|
.emoji[aria-label="multiply"],
|
|
|
|
.emoji[aria-label="plus"],
|
|
|
|
.emoji[aria-label="minus"],
|
|
|
|
.emoji[aria-label="divide"],
|
|
|
|
.emoji[aria-label="curly loop"],
|
|
|
|
.emoji[aria-label="double curly loop"],
|
|
|
|
.emoji[aria-label="wavy dash"],
|
|
|
|
.emoji[aria-label="paw prints"],
|
|
|
|
.emoji[aria-label="musical note"],
|
|
|
|
.emoji[aria-label="musical notes"] {
|
2021-11-24 18:12:03 +05:30
|
|
|
filter: invert(100%) hue-rotate(180deg);
|
2020-11-29 21:22:11 +05:30
|
|
|
}
|