2023-03-15 03:20:19 +01:00
|
|
|
@import "../chroma/dark.css";
|
|
|
|
@import "../codemirror/dark.css";
|
2024-06-09 12:50:53 +02:00
|
|
|
@import "../markup/dark.css";
|
2020-11-17 06:33:19 +01:00
|
|
|
|
2020-10-31 04:52:10 +01:00
|
|
|
:root {
|
2021-11-25 08:14:48 +01:00
|
|
|
--is-dark-theme: true;
|
2024-02-28 11:16:15 +01:00
|
|
|
--color-primary: #4183c4;
|
2022-10-23 06:05:20 +02:00
|
|
|
--color-primary-contrast: #ffffff;
|
2024-02-28 11:16:15 +01:00
|
|
|
--color-primary-dark-1: #548fca;
|
|
|
|
--color-primary-dark-2: #679cd0;
|
|
|
|
--color-primary-dark-3: #7aa8d6;
|
|
|
|
--color-primary-dark-4: #8db5dc;
|
|
|
|
--color-primary-dark-5: #b3cde7;
|
|
|
|
--color-primary-dark-6: #d9e6f3;
|
|
|
|
--color-primary-dark-7: #f4f8fb;
|
|
|
|
--color-primary-light-1: #3876b3;
|
|
|
|
--color-primary-light-2: #31699f;
|
|
|
|
--color-primary-light-3: #2b5c8b;
|
|
|
|
--color-primary-light-4: #254f77;
|
|
|
|
--color-primary-light-5: #193450;
|
|
|
|
--color-primary-light-6: #0c1a28;
|
|
|
|
--color-primary-light-7: #04080c;
|
|
|
|
--color-primary-alpha-10: #4183c419;
|
|
|
|
--color-primary-alpha-20: #4183c433;
|
|
|
|
--color-primary-alpha-30: #4183c44b;
|
|
|
|
--color-primary-alpha-40: #4183c466;
|
|
|
|
--color-primary-alpha-50: #4183c480;
|
|
|
|
--color-primary-alpha-60: #4183c499;
|
|
|
|
--color-primary-alpha-70: #4183c4b3;
|
|
|
|
--color-primary-alpha-80: #4183c4cc;
|
|
|
|
--color-primary-alpha-90: #4183c4e1;
|
2023-05-29 14:45:22 +02:00
|
|
|
--color-primary-hover: var(--color-primary-light-1);
|
|
|
|
--color-primary-active: var(--color-primary-light-2);
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-secondary: #3b444a;
|
|
|
|
--color-secondary-dark-1: #424b51;
|
|
|
|
--color-secondary-dark-2: #4a545b;
|
|
|
|
--color-secondary-dark-3: #59646c;
|
|
|
|
--color-secondary-dark-4: #6b7681;
|
|
|
|
--color-secondary-dark-5: #78858f;
|
|
|
|
--color-secondary-dark-6: #87929d;
|
|
|
|
--color-secondary-dark-7: #939ea9;
|
|
|
|
--color-secondary-dark-8: #a1acb4;
|
|
|
|
--color-secondary-dark-9: #aab3bc;
|
|
|
|
--color-secondary-dark-10: #b6bfc8;
|
|
|
|
--color-secondary-dark-11: #c2cbd3;
|
|
|
|
--color-secondary-dark-12: #ccd4dc;
|
|
|
|
--color-secondary-dark-13: #cfd7df;
|
|
|
|
--color-secondary-light-1: #2e353b;
|
|
|
|
--color-secondary-light-2: #2b353e;
|
|
|
|
--color-secondary-light-3: #1c2227;
|
|
|
|
--color-secondary-light-4: #161b1f;
|
|
|
|
--color-secondary-alpha-10: #3b444a19;
|
|
|
|
--color-secondary-alpha-20: #3b444a33;
|
|
|
|
--color-secondary-alpha-30: #3b444a4b;
|
|
|
|
--color-secondary-alpha-40: #3b444a66;
|
|
|
|
--color-secondary-alpha-50: #3b444a80;
|
|
|
|
--color-secondary-alpha-60: #3b444a99;
|
|
|
|
--color-secondary-alpha-70: #3b444ab3;
|
|
|
|
--color-secondary-alpha-80: #3b444acc;
|
|
|
|
--color-secondary-alpha-90: #3b444ae1;
|
2023-06-09 10:37:47 +02:00
|
|
|
--color-secondary-button: var(--color-secondary-dark-4);
|
|
|
|
--color-secondary-hover: var(--color-secondary-dark-3);
|
|
|
|
--color-secondary-active: var(--color-secondary-dark-2);
|
2023-05-30 22:38:55 +02:00
|
|
|
/* console colors - used for actions console and console files */
|
2024-03-06 22:44:24 +01:00
|
|
|
--color-console-fg: #f8f8f9;
|
|
|
|
--color-console-fg-subtle: #bec4c8;
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-console-bg: #171b1e;
|
|
|
|
--color-console-border: #2e353b;
|
2024-04-07 14:41:42 +02:00
|
|
|
--color-console-hover-bg: #292d31;
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-console-active-bg: #2e353b;
|
|
|
|
--color-console-menu-bg: #252b30;
|
|
|
|
--color-console-menu-border: #424b51;
|
2023-05-24 11:00:29 +02:00
|
|
|
/* named colors */
|
2022-11-12 15:30:52 +01:00
|
|
|
--color-red: #cc4848;
|
2022-10-25 06:08:54 +02:00
|
|
|
--color-orange: #cc580c;
|
|
|
|
--color-yellow: #cc9903;
|
|
|
|
--color-olive: #91a313;
|
|
|
|
--color-green: #87ab63;
|
|
|
|
--color-teal: #00918a;
|
2022-11-12 15:30:52 +01:00
|
|
|
--color-blue: #3a8ac6;
|
|
|
|
--color-violet: #906ae1;
|
|
|
|
--color-purple: #b259d0;
|
|
|
|
--color-pink: #d22e8b;
|
|
|
|
--color-brown: #a47252;
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-black: #1d2328;
|
2023-05-29 14:45:22 +02:00
|
|
|
/* light variants - produced via Sass scale-color(color, $lightness: +10%) */
|
|
|
|
--color-red-light: #d15a5a;
|
|
|
|
--color-orange-light: #f6a066;
|
|
|
|
--color-yellow-light: #eaaf03;
|
|
|
|
--color-olive-light: #abc016;
|
|
|
|
--color-green-light: #93b373;
|
|
|
|
--color-teal-light: #00b6ad;
|
|
|
|
--color-blue-light: #4e96cc;
|
|
|
|
--color-violet-light: #9b79e4;
|
|
|
|
--color-purple-light: #ba6ad5;
|
|
|
|
--color-pink-light: #d74397;
|
|
|
|
--color-brown-light: #b08061;
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-black-light: #424851;
|
2023-05-29 14:45:22 +02:00
|
|
|
/* dark 1 variants - produced via Sass scale-color(color, $lightness: -10%) */
|
|
|
|
--color-red-dark-1: #c23636;
|
|
|
|
--color-orange-dark-1: #f38236;
|
|
|
|
--color-yellow-dark-1: #b88a03;
|
|
|
|
--color-olive-dark-1: #839311;
|
|
|
|
--color-green-dark-1: #7a9e55;
|
|
|
|
--color-teal-dark-1: #00837c;
|
|
|
|
--color-blue-dark-1: #347cb3;
|
|
|
|
--color-violet-dark-1: #7b4edb;
|
|
|
|
--color-purple-dark-1: #a742c9;
|
|
|
|
--color-pink-dark-1: #be297d;
|
|
|
|
--color-brown-dark-1: #94674a;
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-black-dark-1: #292e38;
|
2023-05-29 14:45:22 +02:00
|
|
|
/* dark 2 variants - produced via Sass scale-color(color, $lightness: -20%) */
|
|
|
|
--color-red-dark-2: #ad3030;
|
|
|
|
--color-orange-dark-2: #f16e17;
|
|
|
|
--color-yellow-dark-2: #a37a02;
|
|
|
|
--color-olive-dark-2: #74820f;
|
|
|
|
--color-green-dark-2: #6c8c4c;
|
|
|
|
--color-teal-dark-2: #00746e;
|
|
|
|
--color-blue-dark-2: #2e6e9f;
|
|
|
|
--color-violet-dark-2: #6733d6;
|
|
|
|
--color-purple-dark-2: #9834b9;
|
|
|
|
--color-pink-dark-2: #a9246f;
|
|
|
|
--color-brown-dark-2: #835b42;
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-black-dark-2: #272930;
|
2023-06-28 15:38:55 +02:00
|
|
|
/* ansi colors used for actions console and console files */
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-ansi-black: #1d2328;
|
2024-03-06 22:44:24 +01:00
|
|
|
--color-ansi-red: #cc4848;
|
|
|
|
--color-ansi-green: #87ab63;
|
|
|
|
--color-ansi-yellow: #cc9903;
|
|
|
|
--color-ansi-blue: #3a8ac6;
|
|
|
|
--color-ansi-magenta: #d22e8b;
|
|
|
|
--color-ansi-cyan: #00918a;
|
2023-06-28 15:38:55 +02:00
|
|
|
--color-ansi-white: var(--color-console-fg-subtle);
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-ansi-bright-black: #424851;
|
2024-03-06 22:44:24 +01:00
|
|
|
--color-ansi-bright-red: #d15a5a;
|
|
|
|
--color-ansi-bright-green: #93b373;
|
|
|
|
--color-ansi-bright-yellow: #eaaf03;
|
|
|
|
--color-ansi-bright-blue: #4e96cc;
|
|
|
|
--color-ansi-bright-magenta: #d74397;
|
|
|
|
--color-ansi-bright-cyan: #00b6ad;
|
2023-06-28 15:38:55 +02:00
|
|
|
--color-ansi-bright-white: var(--color-console-fg);
|
2022-10-25 06:08:54 +02:00
|
|
|
/* other colors */
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-grey: #384147;
|
|
|
|
--color-grey-light: #828f99;
|
2022-11-12 15:30:52 +01:00
|
|
|
--color-gold: #b1983b;
|
2020-11-15 21:58:16 +01:00
|
|
|
--color-white: #ffffff;
|
2020-12-17 16:52:58 +01:00
|
|
|
--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-20 21:10:03 +02:00
|
|
|
--color-diff-moved-row-bg: #818044;
|
2020-12-17 16:52:58 +01:00
|
|
|
--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-20 21:10:03 +02:00
|
|
|
--color-diff-moved-row-border: #bcca6f;
|
2020-12-17 16:52:58 +01:00
|
|
|
--color-diff-added-row-border: #314a37;
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-diff-inactive: #22282d;
|
2022-10-25 06:08:54 +02:00
|
|
|
--color-error-border: #a04141;
|
|
|
|
--color-error-bg: #522;
|
2022-12-06 14:15:46 +01:00
|
|
|
--color-error-bg-active: #744;
|
|
|
|
--color-error-bg-hover: #633;
|
2022-10-25 06:08:54 +02:00
|
|
|
--color-error-text: #f9cbcb;
|
2021-12-01 00:40:17 +01:00
|
|
|
--color-success-border: #458a57;
|
2021-12-06 16:49:30 +01:00
|
|
|
--color-success-bg: #284034;
|
2021-12-01 00:40:17 +01:00
|
|
|
--color-success-text: #6cc664;
|
2021-12-06 16:49:30 +01:00
|
|
|
--color-warning-border: #bb9d00;
|
|
|
|
--color-warning-bg: #3a3a30;
|
2021-12-01 00:40:17 +01:00
|
|
|
--color-warning-text: #fbbd08;
|
2021-12-06 16:49:30 +01:00
|
|
|
--color-info-border: #306090;
|
|
|
|
--color-info-bg: #26354c;
|
|
|
|
--color-info-text: #38a8e8;
|
2022-11-23 01:22:27 +01:00
|
|
|
--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;
|
2024-05-10 20:19:35 +02:00
|
|
|
/* Icon colors (PR/Issue/...) */
|
|
|
|
--color-icon-green: var(--color-green);
|
|
|
|
--color-icon-red: var(--color-red);
|
|
|
|
--color-icon-purple: var(--color-purple);
|
2020-11-15 21:58:16 +01:00
|
|
|
/* target-based colors */
|
2024-03-21 00:48:04 +01:00
|
|
|
--color-body: #1c1f25;
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-box-header: #1a1d1f;
|
|
|
|
--color-box-body: #14171a;
|
2024-03-24 13:14:03 +01:00
|
|
|
--color-box-body-highlight: #1c2227;
|
2024-02-29 06:11:11 +01:00
|
|
|
--color-text-dark: #f8f8f9;
|
2024-03-21 00:48:04 +01:00
|
|
|
--color-text: #d1d5d8;
|
|
|
|
--color-text-light: #bdc3c7;
|
|
|
|
--color-text-light-1: #a8afb5;
|
|
|
|
--color-text-light-2: #929ba2;
|
|
|
|
--color-text-light-3: #7c8790;
|
2024-02-29 06:11:11 +01:00
|
|
|
--color-footer: var(--color-nav-bg);
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-timeline: #353c42;
|
2024-02-29 06:11:11 +01:00
|
|
|
--color-input-text: var(--color-text-dark);
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-input-background: #151a1e;
|
|
|
|
--color-input-toggle-background: #2e353b;
|
2023-06-09 10:37:47 +02:00
|
|
|
--color-input-border: var(--color-secondary);
|
|
|
|
--color-input-border-hover: var(--color-secondary-dark-1);
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-light: #00001728;
|
2021-06-28 10:21:43 +02:00
|
|
|
--color-light-mimic-enabled: rgba(0, 0, 0, calc(40 / 255 * 222 / 255 / var(--opacity-disabled)));
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-light-border: #e8e8ff28;
|
|
|
|
--color-hover: #e8e8ff19;
|
|
|
|
--color-active: #e8e8ff24;
|
|
|
|
--color-menu: #151a1e;
|
|
|
|
--color-card: #151a1e;
|
2024-04-06 23:06:27 +02:00
|
|
|
--color-markup-table-row: #e8e8ff0f;
|
|
|
|
--color-markup-code-block: #e8e8ff12;
|
|
|
|
--color-markup-code-inline: #e8e8ff28;
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-button: #151a1e;
|
2024-03-24 13:14:03 +01:00
|
|
|
--color-code-bg: #14171a;
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-shadow: #00001758;
|
2024-03-24 13:14:03 +01:00
|
|
|
--color-secondary-bg: #2f3138;
|
|
|
|
--color-expand-button: #2b353e;
|
2024-02-29 06:11:11 +01:00
|
|
|
--color-placeholder-text: var(--color-text-light-3);
|
2021-04-08 11:53:00 +02:00
|
|
|
--color-editor-line-highlight: var(--color-primary-light-5);
|
2024-05-27 10:59:54 +02:00
|
|
|
--color-project-column-bg: var(--color-secondary-light-2);
|
2021-05-05 20:14:04 +02:00
|
|
|
--color-caret: var(--color-text); /* should ideally be --color-text-dark, see #15651 */
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-reaction-bg: #e8e8ff12;
|
2023-05-28 03:34:18 +02:00
|
|
|
--color-reaction-hover-bg: var(--color-primary-light-4);
|
|
|
|
--color-reaction-active-bg: var(--color-primary-light-5);
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-tooltip-text: #fafafb;
|
|
|
|
--color-tooltip-bg: #000017f0;
|
|
|
|
--color-nav-bg: #16191c;
|
|
|
|
--color-nav-hover-bg: var(--color-secondary-light-1);
|
2023-10-06 09:46:36 +02:00
|
|
|
--color-nav-text: var(--color-text);
|
2024-03-23 00:54:09 +01:00
|
|
|
--color-secondary-nav-bg: #181c20;
|
2024-02-29 06:11:11 +01:00
|
|
|
--color-label-text: var(--color-text);
|
2024-03-15 19:14:33 +01:00
|
|
|
--color-label-bg: #73828e4b;
|
|
|
|
--color-label-hover-bg: #73828ea0;
|
|
|
|
--color-label-active-bg: #73828eff;
|
2022-10-23 06:05:20 +02:00
|
|
|
--color-accent: var(--color-primary-light-1);
|
2022-10-07 11:48:03 +02:00
|
|
|
--color-small-accent: var(--color-primary-light-5);
|
2024-03-24 13:14:03 +01:00
|
|
|
--color-highlight-fg: #87651e;
|
|
|
|
--color-highlight-bg: #352c1c;
|
2023-08-17 00:12:40 +02:00
|
|
|
--color-overlay-backdrop: #080808c0;
|
2024-05-24 19:33:13 +02:00
|
|
|
/* pattern colors for image diff */
|
|
|
|
--checkerboard-color-1: #313131;
|
|
|
|
--checkerboard-color-2: #212121;
|
2022-10-28 07:45:08 +02:00
|
|
|
accent-color: var(--color-accent);
|
|
|
|
color-scheme: dark;
|
2021-05-04 15:56:43 +02:00
|
|
|
}
|
|
|
|
|
2020-11-29 16:52:11 +01:00
|
|
|
/* 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 13:42:03 +01:00
|
|
|
filter: invert(100%) hue-rotate(180deg);
|
2020-11-29 16:52:11 +01:00
|
|
|
}
|