733 lines
30 KiB
CSS
733 lines
30 KiB
CSS
/* ==========================================================================
|
|
Gitea Pitch Black - High Contrast (human-readable build:
|
|
theme-pitchblack-hc-max.css)
|
|
https://github.com/iamdoubz/Gitea-Pitch-Black
|
|
--------------------------------------------------------------------------
|
|
Base: Gitea "Dark" theme (web_src/css/themes/theme-gitea-dark.css,
|
|
tag v28.1.0), by way of the regular Pitch Black theme.
|
|
Targets: Gitea v28.x (also works on v1.27.x)
|
|
|
|
What makes this the high contrast variant
|
|
-----------------------------------------
|
|
It follows the conventions shared by the dark high contrast themes of
|
|
other platforms:
|
|
|
|
* Windows 11 "Night sky" contrast theme (hc2.theme)
|
|
Window #000000, WindowText #FFFFFF, HotTrackingColor (links)
|
|
#8080FF, GrayText (disabled only) #A6A6A6, Highlight #D6B4FD on
|
|
HighlightText #2B2B2B, ButtonText #FFEE32, ActiveBorder #FFFF00.
|
|
Guidance: one background color for all surfaces, borders where
|
|
boundaries matter, 2px borders on flyouts/dialogs, the link color
|
|
is used for links only, grey is reserved for disabled UI.
|
|
(Aquatic #202020/#75E9FC and Dusk #2D3236/#70EBDE use the same model.)
|
|
* VS Code "Dark High Contrast"
|
|
Background #000000, foreground #FFFFFF, contrastBorder #6FC3DF
|
|
around everything, focusBorder #F38518 (orange) on whatever has
|
|
focus, links #21A6FF, errors #F48771, warnings #FFD370, diffs shown
|
|
with bright outlines rather than tinted backgrounds.
|
|
* GitHub (Primer) "Dark high contrast"
|
|
Text #FFFFFF, secondary text #B7BDC8 (still ~10:1), borders as
|
|
bright as secondary text, links #74B9FF, bright status colors
|
|
(#2BD853 / #FF9492 / #F0B72F), solid colored word-level diff
|
|
highlights with white text, pastel syntax colors.
|
|
* WCAG 2.2 AAA: 7:1 for text (1.4.6), 3:1 for UI boundaries and
|
|
focus indicators (1.4.11), visible focus (2.4.7 / 2.4.13), links
|
|
not distinguished by color alone in running text (1.4.1).
|
|
|
|
Resulting rules for this theme
|
|
1. Every surface is #000000. Nothing is told apart by a slightly
|
|
lighter panel; boxes, menus, inputs and buttons are separated by
|
|
bright borders (#A0A0A0, 8:1 on black) instead.
|
|
2. All text is >= 7:1 on black. Body text is pure white; the dimmest
|
|
"secondary" text is #B3B3B3 (10:1). #A6A6A6 is used only for
|
|
placeholders/disabled UI, as on Windows.
|
|
3. Monochrome accents. Gitea's "primary" color is white: primary
|
|
buttons are white with black text, active tabs are underlined in
|
|
white, checked checkboxes are white. This is Windows' "Highlight"
|
|
model (light fill, dark text) and keeps the Pitch Black look.
|
|
4. Links get one reserved color (cyan #75E9FC, from Windows Aquatic,
|
|
14.8:1) and are underlined in rendered markdown, so they never rely
|
|
on color alone in prose.
|
|
5. A single, unmistakable focus color: 2px solid orange #F38518
|
|
(VS Code HC focusBorder, 8:1) on anything that has keyboard focus.
|
|
6. Popups (menus, tooltips, modals) get a 2px white ring so they stand
|
|
off the black page, per the Windows flyout guidance.
|
|
7. Status, label and diff colors are brightened for text and darkened
|
|
for fills, so both "colored text on black" and "white text on a
|
|
colored fill" stay >= 7:1.
|
|
|
|
Note: if Windows contrast themes are turned on, Chrome/Edge/Firefox
|
|
replace page colors with the system palette ("forced colors") anyway.
|
|
This theme is for people who want high contrast in Gitea without
|
|
switching their whole OS, or on platforms without forced colors.
|
|
|
|
Install:
|
|
1. Copy ONE of theme-pitchblack-hc.css (minified) or this file to
|
|
$GITEA_CUSTOM/public/assets/css/
|
|
2. If app.ini sets [ui] THEMES, add pitchblack-hc to the list.
|
|
3. Restart Gitea and pick "Pitch Black (High Contrast)" under
|
|
Settings > Appearance.
|
|
========================================================================== */
|
|
|
|
|
|
/* --------------------------------------------------------------------------
|
|
Theme meta info - read by the Gitea server for the theme picker.
|
|
-------------------------------------------------------------------------- */
|
|
gitea-theme-meta-info {
|
|
--theme-display-name: "Pitch Black (High Contrast)";
|
|
--theme-color-scheme: "dark";
|
|
}
|
|
|
|
|
|
:root {
|
|
/* Read by Gitea's JavaScript to choose dark variants (charts, Mermaid,
|
|
code editor). Must stay true. */
|
|
--is-dark-theme: true;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
Primary color = white (monochrome accent, see rule 3 in the header)
|
|
Gitea reuses individual primary shades for unrelated jobs, so they are
|
|
set one by one rather than as a smooth scale. What each is used for
|
|
in Gitea v28 is noted next to it.
|
|
------------------------------------------------------------------------ */
|
|
--color-primary: #ffffff; /* primary buttons, active tabs, checkboxes, focus fallback */
|
|
--color-primary-contrast: #000000; /* text on primary fills: black on white, 21:1 */
|
|
--color-primary-dark-1: #ffffff; /* "lighter" steps: text on hover, primary label borders */
|
|
--color-primary-dark-2: #f2f2f2;
|
|
--color-primary-dark-3: #e6e6e6; /* primary label hover fill (black text on it) */
|
|
--color-primary-dark-4: #ffffff;
|
|
--color-primary-dark-5: #ffffff;
|
|
--color-primary-dark-6: #ffffff;
|
|
--color-primary-dark-7: #ffffff;
|
|
--color-primary-light-1: #1c4fb8; /* text selection (::selection) - white text on it, 7.3:1 */
|
|
--color-primary-light-2: #c2c2c2;
|
|
--color-primary-light-3: #a6a6a6;
|
|
--color-primary-light-4: #d4d4d4; /* review comment counter fill - black text on it */
|
|
--color-primary-light-5: #b3b3b3; /* review counter hover fill */
|
|
--color-primary-light-6: #1a1a1a; /* autofilled inputs, Actions summary background */
|
|
--color-primary-light-7: #a0a0a0; /* image diff frame border */
|
|
/* translucent white - selection rings and highlighted editor ranges */
|
|
--color-primary-alpha-10: #ffffff19;
|
|
--color-primary-alpha-20: #ffffff33;
|
|
--color-primary-alpha-30: #ffffff4b;
|
|
--color-primary-alpha-40: #ffffff66;
|
|
--color-primary-alpha-50: #ffffff80;
|
|
--color-primary-alpha-60: #ffffff99;
|
|
--color-primary-alpha-70: #ffffffb3;
|
|
--color-primary-alpha-80: #ffffffcc;
|
|
--color-primary-alpha-90: #ffffffe1;
|
|
/* primary button hover/pressed fills (black text stays >= 11:1) */
|
|
--color-primary-hover: #d9d9d9;
|
|
--color-primary-active: #bfbfbf;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
Secondary (neutral) scale
|
|
--color-secondary is Gitea's default border color. HC themes make
|
|
borders as bright as secondary text (Primer) or a vivid color (VS Code);
|
|
#A0A0A0 is 8:1 on black, far above the 3:1 WCAG asks for.
|
|
The "dark-N" steps get lighter and are used for borders, strokes and
|
|
icon tints; "light-N" steps are dark fills that sit under white text.
|
|
------------------------------------------------------------------------ */
|
|
--color-secondary: #a0a0a0;
|
|
--color-secondary-dark-1: #a8a8a8;
|
|
--color-secondary-dark-2: #b0b0b0;
|
|
--color-secondary-dark-3: #bcbcbc;
|
|
--color-secondary-dark-4: #c4c4c4;
|
|
--color-secondary-dark-5: #cccccc;
|
|
--color-secondary-dark-6: #d4d4d4;
|
|
--color-secondary-dark-7: #dcdcdc;
|
|
--color-secondary-dark-8: #e4e4e4;
|
|
--color-secondary-dark-9: #e8e8e8;
|
|
--color-secondary-dark-10: #ececec;
|
|
--color-secondary-dark-11: #f0f0f0;
|
|
--color-secondary-dark-12: #f4f4f4;
|
|
--color-secondary-dark-13: #f8f8f8;
|
|
--color-secondary-light-1: #333333; /* nav hover fill - white text 12.6:1 */
|
|
--color-secondary-light-2: #262626;
|
|
--color-secondary-light-3: #1a1a1a;
|
|
--color-secondary-light-4: #0d0d0d;
|
|
--color-secondary-alpha-10: #a0a0a019;
|
|
--color-secondary-alpha-20: #a0a0a033;
|
|
--color-secondary-alpha-30: #a0a0a04b;
|
|
--color-secondary-alpha-40: #a0a0a066;
|
|
--color-secondary-alpha-50: #a0a0a080;
|
|
--color-secondary-alpha-60: #a0a0a099;
|
|
--color-secondary-alpha-70: #a0a0a0b3;
|
|
--color-secondary-alpha-80: #a0a0a0cc;
|
|
--color-secondary-alpha-90: #a0a0a0e1;
|
|
--color-secondary-button: #333333;
|
|
--color-secondary-hover: #4d4d4d;
|
|
--color-secondary-active: #575757;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
Console colors (Actions job logs, console file previews)
|
|
------------------------------------------------------------------------ */
|
|
--color-console-fg: #ffffff;
|
|
--color-console-fg-subtle: #d4d4d4;
|
|
--color-console-bg: #000000;
|
|
--color-console-hover-bg: #262626;
|
|
--color-console-active-bg: #333333;
|
|
--color-console-link: #75e9fc;
|
|
/* v1.27 only (removed in v28, harmless there) */
|
|
--color-console-border: #a0a0a0;
|
|
--color-console-menu-bg: #000000;
|
|
--color-console-menu-border: #ffffff;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
Named colors
|
|
The base name (e.g. --color-red) is mostly used as a FILL with white
|
|
text (red "Delete" buttons, green labels), so base values are dark
|
|
enough for white text at >= 7:1. "-dark-1"/"-dark-2" are hover and
|
|
pressed fills (darker still). "-light" is the TEXT version (~9:1 on
|
|
black); the "Colored text" section at the bottom of this file points
|
|
Gitea's colored-text rules at it.
|
|
------------------------------------------------------------------------ */
|
|
--color-red: #9f2c2c;
|
|
--color-orange: #944009;
|
|
--color-yellow: #715402;
|
|
--color-olive: #515b0b;
|
|
--color-green: #495f33;
|
|
--color-teal: #00625d;
|
|
--color-blue: #265b81;
|
|
--color-violet: #642dd5;
|
|
--color-purple: #842ea1;
|
|
--color-pink: #a2236b;
|
|
--color-brown: #75513b;
|
|
--color-black: #000000;
|
|
/* text-on-black versions (~9:1) */
|
|
--color-red-light: #ff8080;
|
|
--color-orange-light: #f5914f;
|
|
--color-yellow-light: #ffd370;
|
|
--color-olive-light: #c4d63a;
|
|
--color-green-light: #5ff07a;
|
|
--color-teal-light: #39d0d8;
|
|
--color-blue-light: #74b9ff;
|
|
--color-violet-light: #b69deb;
|
|
--color-purple-light: #d3abff;
|
|
--color-pink-light: #ff9bce;
|
|
--color-brown-light: #c6a28c;
|
|
--color-black-light: #4d4d4d;
|
|
/* hover fills */
|
|
--color-red-dark-1: #8c2626;
|
|
--color-orange-dark-1: #7d3607;
|
|
--color-yellow-dark-1: #5f4702;
|
|
--color-olive-dark-1: #464f09;
|
|
--color-green-dark-1: #3d4f2a;
|
|
--color-teal-dark-1: #005450;
|
|
--color-blue-dark-1: #204e70;
|
|
--color-violet-dark-1: #5626bf;
|
|
--color-purple-dark-1: #73278c;
|
|
--color-pink-dark-1: #881d5a;
|
|
--color-brown-dark-1: #624431;
|
|
--color-black-dark-1: #000000;
|
|
/* pressed fills */
|
|
--color-red-dark-2: #731f1f;
|
|
--color-orange-dark-2: #662c06;
|
|
--color-yellow-dark-2: #4d3a01;
|
|
--color-olive-dark-2: #394107;
|
|
--color-green-dark-2: #314022;
|
|
--color-teal-dark-2: #004441;
|
|
--color-blue-dark-2: #1a3f5a;
|
|
--color-violet-dark-2: #4620a0;
|
|
--color-purple-dark-2: #5e2073;
|
|
--color-pink-dark-2: #6f184a;
|
|
--color-brown-dark-2: #503828;
|
|
--color-black-dark-2: #000000;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
ANSI colors (Actions logs). Bright, readable values on black; "black"
|
|
is a mid grey so black-on-black log text is still visible.
|
|
------------------------------------------------------------------------ */
|
|
--color-ansi-black: #767676;
|
|
--color-ansi-red: #ff7b72;
|
|
--color-ansi-green: #3fdc5a;
|
|
--color-ansi-yellow: #f0c000;
|
|
--color-ansi-blue: #79c0ff;
|
|
--color-ansi-magenta: #ff7ad9;
|
|
--color-ansi-cyan: #39d0d8;
|
|
--color-ansi-white: var(--color-console-fg-subtle);
|
|
--color-ansi-bright-black: #a6a6a6;
|
|
--color-ansi-bright-red: #ffa198;
|
|
--color-ansi-bright-green: #72f088;
|
|
--color-ansi-bright-yellow: #ffee32;
|
|
--color-ansi-bright-blue: #a5d6ff;
|
|
--color-ansi-bright-magenta: #ffa8e8;
|
|
--color-ansi-bright-cyan: #75e9fc;
|
|
--color-ansi-bright-white: var(--color-console-fg);
|
|
|
|
/* ------------------------------------------------------------------------
|
|
16-color series (language bar, activity charts). Stock colors, with
|
|
any that were below 4.5:1 on black lightened to 4.5:1.
|
|
------------------------------------------------------------------------ */
|
|
--color-series-16-0: #7db233;
|
|
--color-series-16-1: #499a37;
|
|
--color-series-16-2: #ce4751;
|
|
--color-series-16-3: #8f9121;
|
|
--color-series-16-4: #c239bc;
|
|
--color-series-16-5: #835aeb;
|
|
--color-series-16-6: #c67d28;
|
|
--color-series-16-7: #4db392;
|
|
--color-series-16-8: #bf5636;
|
|
--color-series-16-9: #307f96;
|
|
--color-series-16-10: #c45327;
|
|
--color-series-16-11: #3d965c;
|
|
--color-series-16-12: #ac4bcb;
|
|
--color-series-16-13: #439d73;
|
|
--color-series-16-14: #3e6ded;
|
|
--color-series-16-15: #c43cac;
|
|
|
|
/* other named colors */
|
|
--color-grey: #333333; /* grey label/button fill */
|
|
--color-grey-light: #b3b3b3; /* grey text */
|
|
--color-gold: #e0c25a; /* stars, sponsor */
|
|
--color-white: #ffffff;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
Diff colors
|
|
Row tints stay dark so white code text stays >= 11:1; word-level
|
|
changes use solid fills with white text (Primer HC) and rows get
|
|
vivid borders where Gitea draws them (VS Code HC). The +/- markers
|
|
in the gutter keep the meaning visible without color.
|
|
------------------------------------------------------------------------ */
|
|
--color-diff-added-fg: #5ff07a;
|
|
--color-diff-added-linenum-bg: #0f4020;
|
|
--color-diff-added-row-bg: #0a2e14;
|
|
--color-diff-added-row-border: #33ff2e;
|
|
--color-diff-added-word-bg: #145c2a;
|
|
--color-diff-moved-row-bg: #3d3d00;
|
|
--color-diff-moved-row-border: #ffee32;
|
|
--color-diff-removed-fg: #ff7b8a;
|
|
--color-diff-removed-linenum-bg: #4d1219;
|
|
--color-diff-removed-row-bg: #330c12;
|
|
--color-diff-removed-row-border: #ff008f;
|
|
--color-diff-removed-word-bg: #8f1225;
|
|
--color-diff-inactive: #1a1a1a;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
Message / status colors
|
|
Bright text and full-strength borders (VS Code HC / Primer HC values),
|
|
with backgrounds that stay near black so white body text inside a
|
|
message still reads at >= 14:1.
|
|
------------------------------------------------------------------------ */
|
|
--color-error-border: #ff6a69;
|
|
--color-error-bg: #2a0f0f;
|
|
--color-error-bg-active: #4a1a1a;
|
|
--color-error-bg-hover: #3a1414;
|
|
--color-error-text: #ff8080;
|
|
--color-success-border: #2bd853;
|
|
--color-success-bg: #0b2414;
|
|
--color-success-text: #2bd853;
|
|
--color-warning-border: #f0b72f;
|
|
--color-warning-bg: #2a1f00;
|
|
--color-warning-text: #ffd370;
|
|
--color-info-border: #74b9ff;
|
|
--color-info-bg: #0b1a2e;
|
|
--color-info-text: #74b9ff;
|
|
--color-priority-border: #d3abff;
|
|
--color-priority-bg: #1a0f2e;
|
|
--color-priority-text: #d3abff;
|
|
|
|
/* badges (pill counters / state chips) - bright text on a faint tint */
|
|
--color-red-badge: #ff8080;
|
|
--color-red-badge-bg: #ff80801a;
|
|
--color-red-badge-hover-bg: #ff80804d;
|
|
--color-green-badge: #2bd853;
|
|
--color-green-badge-bg: #2bd8531a;
|
|
--color-green-badge-hover-bg: #2bd8534d;
|
|
--color-yellow-badge: #ffd370;
|
|
--color-yellow-badge-bg: #ffd3701a;
|
|
--color-yellow-badge-hover-bg: #ffd3704d;
|
|
--color-orange-badge: #f5914f;
|
|
--color-orange-badge-bg: #f5914f1a;
|
|
--color-orange-badge-hover-bg: #f5914f4d;
|
|
|
|
--color-git: #f05133;
|
|
--color-logo: #609926;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
Surfaces - all pure black (rule 1). Structure comes from borders.
|
|
------------------------------------------------------------------------ */
|
|
--color-body: #000000;
|
|
--color-box-header: #000000;
|
|
--color-box-body: #000000;
|
|
--color-box-body-highlight: #1a1a1a;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
Text - everything >= 7:1 (rule 2)
|
|
------------------------------------------------------------------------ */
|
|
--color-text-dark: #ffffff; /* 21:1 */
|
|
--color-text: #ffffff; /* 21:1 */
|
|
--color-text-light: #e6e6e6; /* 17:1 */
|
|
--color-text-light-1: #d4d4d4; /* 14:1 */
|
|
--color-text-light-2: #c2c2c2; /* 12:1 */
|
|
--color-text-light-3: #b3b3b3; /* 10:1 - timestamps, meta */
|
|
--color-footer: var(--color-nav-bg);
|
|
--color-timeline: #a0a0a0; /* issue timeline line, same as borders */
|
|
|
|
/* inputs: black fill, bright border (VS Code HC: input.border = contrastBorder) */
|
|
--color-input-text: #ffffff;
|
|
--color-input-background: #000000;
|
|
--color-input-toggle-background: #767676; /* toggle off-state, 4.6:1 vs black */
|
|
--color-input-border: #bcbcbc;
|
|
|
|
/* hover / active overlays: clearly visible steps on black */
|
|
--color-light: #00000028;
|
|
--color-light-border: #a0a0a0; /* button and label borders */
|
|
--color-hover: #ffffff26; /* ~#262626 on black */
|
|
--color-hover-opaque: #262626;
|
|
--color-active: #ffffff40; /* ~#404040 on black; white text 10:1 */
|
|
|
|
/* menus, cards, buttons, code - black, separated by borders */
|
|
--color-menu: #000000;
|
|
--color-card: #000000;
|
|
--color-markup-table-row: #ffffff14;
|
|
--color-markup-code-block: #000000; /* fenced code: black + border (see rules) */
|
|
--color-markup-code-inline: #ffffff2e; /* inline code chip, white text ~13:1 */
|
|
--color-button: #000000;
|
|
--color-code-bg: #000000;
|
|
--color-shadow: #00000000; /* HC themes don't rely on shadows */
|
|
--color-shadow-opaque: #000000;
|
|
--color-secondary-bg: #1a1a1a;
|
|
--color-expand-button: #333333;
|
|
--color-placeholder-text: #a6a6a6; /* Windows GrayText, 8.6:1 */
|
|
--color-editor-line-highlight: #ffffff1f;
|
|
--color-editor-selection: #1c4fb8; /* same as text selection, white text 7.3:1 */
|
|
--color-project-column-bg: #000000;
|
|
--color-caret: #ffffff;
|
|
|
|
/* reactions */
|
|
--color-reaction-bg: #ffffff1f;
|
|
--color-reaction-hover-bg: #ffffff40;
|
|
--color-reaction-active-bg: #ffffff33;
|
|
|
|
/* tooltips - black with a white ring (see "Popups" rules) */
|
|
--color-tooltip-text: #ffffff;
|
|
--color-tooltip-bg: #000000;
|
|
|
|
/* navigation */
|
|
--color-nav-bg: #000000;
|
|
--color-nav-hover-bg: var(--color-secondary-light-1);
|
|
--color-nav-text: #ffffff;
|
|
--color-secondary-nav-bg: #000000;
|
|
|
|
/* uncolored labels */
|
|
--color-label-text: #ffffff;
|
|
--color-label-bg: #ffffff26;
|
|
--color-label-hover-bg: #ffffff40;
|
|
--color-label-active-bg: #ffffff59;
|
|
|
|
--color-accent: #ffffff; /* native checkbox/radio/range accent */
|
|
--color-small-accent: #333333;
|
|
|
|
/* active line / search match: dark fill + bright yellow marker
|
|
(Night sky ButtonText #FFEE32) */
|
|
--color-highlight-fg: #ffee32;
|
|
--color-highlight-bg: #3d3300;
|
|
|
|
--color-overlay-backdrop: #000000e6;
|
|
--color-danger: var(--color-red);
|
|
--color-transparency-grid-light: #333333;
|
|
--color-transparency-grid-dark: #1a1a1a;
|
|
--color-workflow-edge-hover: #ffffff;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
Syntax highlighting - every token >= 7:1 on black.
|
|
Palette follows Primer HC's pastel tokens plus VS Code HC's green
|
|
comments; operators and punctuation are plain white.
|
|
------------------------------------------------------------------------ */
|
|
--color-syntax-keyword: #ff9492;
|
|
--color-syntax-bool: #91cbff;
|
|
--color-syntax-control: #ff9492;
|
|
--color-syntax-name: #dbb7ff;
|
|
--color-syntax-type: #7ee8c8;
|
|
--color-syntax-number: #91cbff;
|
|
--color-syntax-operator: #e6e6e6;
|
|
--color-syntax-regexp: #ff9bce;
|
|
--color-syntax-string: #addcff;
|
|
--color-syntax-comment: #94c48a;
|
|
--color-syntax-invalid: #ff6a69;
|
|
--color-syntax-link: var(--pb-link);
|
|
--color-syntax-tag: #72f088;
|
|
--color-syntax-attribute: #91cbff;
|
|
--color-syntax-property: #91cbff;
|
|
--color-syntax-variable: #ffb757;
|
|
--color-syntax-string-special: #ffb757;
|
|
--color-syntax-escape: #ff9bce;
|
|
--color-syntax-entity: #dbb7ff;
|
|
--color-syntax-preproc: #ff9492;
|
|
--color-syntax-preproc-file: #addcff;
|
|
--color-syntax-decorator: #dbb7ff;
|
|
--color-syntax-namespace: #ffffff;
|
|
--color-syntax-name-pseudo: #91cbff;
|
|
--color-syntax-comment-special: #ffb757;
|
|
--color-syntax-text: #ffffff;
|
|
--color-syntax-text-alt: #e6e6e6;
|
|
--color-syntax-punctuation: #ffffff;
|
|
--color-syntax-whitespace: #a6a6a6;
|
|
--color-syntax-diff-fg: #ffffff;
|
|
--color-syntax-deleted-bg: #8f1225;
|
|
--color-syntax-inserted-bg: #145c2a;
|
|
--color-syntax-emph: #ffd370;
|
|
--color-syntax-strong: #ffb757;
|
|
--color-syntax-heading: #91cbff;
|
|
--color-syntax-subheading: #addcff;
|
|
--color-syntax-output: #c2c2c2;
|
|
--color-syntax-prompt: #ffb757;
|
|
--color-syntax-traceback: #ff8080;
|
|
--color-syntax-matching-bracket-bg: #39d0d866;
|
|
--color-syntax-nonmatching-bracket-bg: #ff6a6966;
|
|
|
|
/* ------------------------------------------------------------------------
|
|
Pitch Black HC variables (--pb-*), used by the rules below.
|
|
------------------------------------------------------------------------ */
|
|
--pb-link: #75e9fc; /* links only (rule 4), 14.8:1 */
|
|
--pb-focus: #f38518; /* keyboard focus ring (rule 5), 8.2:1 */
|
|
--pb-popup-ring: #ffffff; /* 2px ring on menus/tooltips/modals (rule 6) */
|
|
/* contribution heatmap: grey -> white. Level 0 is lifted off black so
|
|
"no activity" squares are still visible as a grid. */
|
|
--pb-heatmap-0: #262626;
|
|
--pb-heatmap-1: #5c5c5c;
|
|
--pb-heatmap-2: #8f8f8f;
|
|
--pb-heatmap-3: #c2c2c2;
|
|
--pb-heatmap-4: #ffffff;
|
|
--pb-heatmap-5: #ffffff;
|
|
|
|
/* browser-level settings */
|
|
accent-color: var(--color-accent);
|
|
color-scheme: dark;
|
|
scrollbar-color: #a0a0a0 #000000; /* bright thumb on a black track */
|
|
}
|
|
|
|
|
|
/* --------------------------------------------------------------------------
|
|
Links (rule 4)
|
|
One reserved color for links everywhere. Gitea's "muted" links (issue
|
|
titles in lists, file names, usernames in some places) keep the text
|
|
color until hovered, like GitHub HC does, then switch to the link color.
|
|
-------------------------------------------------------------------------- */
|
|
a,
|
|
a:hover,
|
|
a.muted:hover,
|
|
.muted-links a:hover {
|
|
color: var(--pb-link);
|
|
}
|
|
/* other places Gitea switches text to the primary color on hover */
|
|
.ui.card > .extra a:not(.ui):hover,
|
|
.comment-text-line a:hover,
|
|
.title-full-link-hover:not(:has(:not(.title-full-link):hover)):hover > a.title-full-link,
|
|
.avatar-stack-popup-trigger:hover,
|
|
.console a:hover {
|
|
color: var(--pb-link);
|
|
}
|
|
.items-with-main > .item a:not(.label, .button):hover {
|
|
color: var(--pb-link) !important;
|
|
}
|
|
/* Links in rendered markdown are always underlined, so they don't rely on
|
|
color alone in running text (WCAG 1.4.1). Thicker line on hover. */
|
|
.markup a:not(.anchor, .ui) {
|
|
text-decoration-line: underline;
|
|
text-underline-offset: 0.2em;
|
|
}
|
|
.markup a:not(.anchor, .ui):hover {
|
|
text-decoration-thickness: 2px;
|
|
}
|
|
|
|
|
|
/* --------------------------------------------------------------------------
|
|
Keyboard focus (rule 5)
|
|
A 2px orange outline, offset from the element so it never blends into
|
|
the element's own border. Applies to every focusable control.
|
|
-------------------------------------------------------------------------- */
|
|
a:focus-visible,
|
|
button:focus-visible,
|
|
.ui.button:focus-visible,
|
|
[role="button"]:focus-visible,
|
|
[tabindex]:focus-visible,
|
|
summary:focus-visible,
|
|
.ui.dropdown:focus-visible,
|
|
.ui.checkbox input:focus-visible,
|
|
input:focus-visible,
|
|
select:focus-visible,
|
|
textarea:focus-visible {
|
|
outline: 2px solid var(--pb-focus) !important;
|
|
outline-offset: 2px !important;
|
|
}
|
|
|
|
|
|
/* --------------------------------------------------------------------------
|
|
Popups (rule 6)
|
|
Menus, dropdowns, tooltips and modals are black like the page, so a 2px
|
|
white ring marks their edge. box-shadow is used so layout is unchanged.
|
|
-------------------------------------------------------------------------- */
|
|
.tippy-box[data-theme="default"],
|
|
.tippy-box[data-theme="menu"],
|
|
.tippy-box[data-theme="tooltip"],
|
|
.ui.dropdown .menu,
|
|
.ui.modal {
|
|
box-shadow: 0 0 0 2px var(--pb-popup-ring) !important;
|
|
}
|
|
/* the tooltip arrow is drawn in the tooltip background color; outline it */
|
|
.tippy-box[data-theme="tooltip"] .tippy-svg-arrow-outer {
|
|
fill: var(--pb-popup-ring);
|
|
}
|
|
|
|
|
|
/* --------------------------------------------------------------------------
|
|
Code blocks
|
|
Fenced code in markdown is black like everything else, so it gets a
|
|
border instead of a tinted fill.
|
|
-------------------------------------------------------------------------- */
|
|
.markup pre {
|
|
border: 1px solid var(--color-secondary);
|
|
}
|
|
|
|
|
|
/* --------------------------------------------------------------------------
|
|
Places Gitea uses the border color as a FILL behind text
|
|
With bright HC borders these would put white text on light grey, so
|
|
they're given a dark fill instead.
|
|
-------------------------------------------------------------------------- */
|
|
.repository.file.editor .commit-form-wrapper .commit-form .quick-pull-choice .branch-name,
|
|
.repository .repository-summary .sub-menu .item.active,
|
|
.markup .auto-hide-control .ui.button:hover,
|
|
.file-view.code-view .ui.button.code-line-button:hover,
|
|
.code-editor-container .cm-tooltip-autocomplete-disabled ul li[aria-selected] {
|
|
background: #404040 !important; /* white text 10:1 */
|
|
}
|
|
|
|
|
|
/* --------------------------------------------------------------------------
|
|
Colored text (rule 7)
|
|
Gitea uses the same --color-<name> for colored fills (with white text)
|
|
and for colored text on the page. The base values above are tuned for
|
|
fills; these rules point the text uses at the bright "-light" versions.
|
|
-------------------------------------------------------------------------- */
|
|
/* Tailwind helpers used in templates, e.g. issue open/closed icons */
|
|
.tw-text-red { color: var(--color-red-light) !important; }
|
|
.tw-text-orange { color: var(--color-orange-light) !important; }
|
|
.tw-text-yellow { color: var(--color-yellow-light) !important; }
|
|
.tw-text-olive { color: var(--color-olive-light) !important; }
|
|
.tw-text-green { color: var(--color-green-light) !important; }
|
|
.tw-text-teal { color: var(--color-teal-light) !important; }
|
|
.tw-text-blue { color: var(--color-blue-light) !important; }
|
|
.tw-text-violet { color: var(--color-violet-light) !important; }
|
|
.tw-text-purple { color: var(--color-purple-light) !important; }
|
|
.tw-text-pink { color: var(--color-pink-light) !important; }
|
|
.tw-text-brown { color: var(--color-brown-light) !important; }
|
|
/* rules in Gitea's own CSS that color text with a named color */
|
|
.dashboard.issues .right.stackable.menu > .item.active,
|
|
.non-diff-file-content .header .file-actions .btn-octicon-danger:hover,
|
|
.repository .diff-detail-box .diff-detail-stats strong:nth-of-type(3),
|
|
.page-content.install .ui .reinstall-message,
|
|
.ui.form .required.field > label::after,
|
|
.ui.form .required.field > .checkbox::after,
|
|
.ui.form label.required::after,
|
|
.unicode-escaped .escaped-code-point[data-escaped]::before,
|
|
.markup .jupyter-notebook .cell-output-error,
|
|
.ui.basic.red.button,
|
|
.ui.basic.red.button:hover,
|
|
.ui.basic.red.button:active,
|
|
.ui.ui.ui.basic.red.label,
|
|
a.ui.ui.ui.basic.red.label:hover {
|
|
color: var(--color-red-light);
|
|
}
|
|
.repository .diff-detail-box .diff-detail-stats strong:nth-of-type(2),
|
|
.ui.basic.green.button,
|
|
.ui.basic.green.button:hover,
|
|
.ui.basic.green.button:active,
|
|
.ui.ui.ui.basic.green.label,
|
|
a.ui.ui.ui.basic.green.label:hover {
|
|
color: var(--color-green-light);
|
|
}
|
|
.repository .diff-detail-box .diff-detail-stats strong:nth-of-type(1),
|
|
.ui.ui.ui.basic.yellow.label,
|
|
a.ui.ui.ui.basic.yellow.label:hover {
|
|
color: var(--color-yellow-light);
|
|
}
|
|
.ui.ui.ui.basic.orange.label,
|
|
a.ui.ui.ui.basic.orange.label:hover {
|
|
color: var(--color-orange-light);
|
|
}
|
|
|
|
|
|
/* --------------------------------------------------------------------------
|
|
Folder icons - stock Gitea colors them primary; white here.
|
|
-------------------------------------------------------------------------- */
|
|
.svg.octicon-file-directory-fill,
|
|
.svg.octicon-file-directory-open-fill,
|
|
.svg.octicon-file-submodule {
|
|
color: var(--color-text-light-1);
|
|
}
|
|
|
|
|
|
/* --------------------------------------------------------------------------
|
|
Contribution heatmap
|
|
Gitea paints days with inline var(--color-primary-*) fills; redefining
|
|
those variables only inside #user-heatmap swaps in the grey -> white
|
|
scale. Level 0 is lifted off black so the empty grid stays visible.
|
|
0 none -> --color-secondary-alpha-60
|
|
1 -> --color-primary-light-4
|
|
2 -> --color-primary-light-2
|
|
3 -> --color-primary
|
|
4 most -> --color-primary-dark-2
|
|
5 legend -> --color-primary-dark-4
|
|
-------------------------------------------------------------------------- */
|
|
#user-heatmap {
|
|
--color-secondary-alpha-60: var(--pb-heatmap-0);
|
|
--color-primary-light-4: var(--pb-heatmap-1);
|
|
--color-primary-light-2: var(--pb-heatmap-2);
|
|
--color-primary: var(--pb-heatmap-3);
|
|
--color-primary-dark-2: var(--pb-heatmap-4);
|
|
--color-primary-dark-4: var(--pb-heatmap-5);
|
|
}
|
|
|
|
|
|
/* --------------------------------------------------------------------------
|
|
Invert black emoji glyphs that disappear on black.
|
|
v28+ tags emoji with data-alias, v1.27 with aria-label; both included.
|
|
-------------------------------------------------------------------------- */
|
|
/* v28+ */
|
|
.emoji[data-alias="heavy_check_mark"],
|
|
.emoji[data-alias="currency_exchange"],
|
|
.emoji[data-alias="top"],
|
|
.emoji[data-alias="end"],
|
|
.emoji[data-alias="on"],
|
|
.emoji[data-alias="soon"],
|
|
.emoji[data-alias="heavy_dollar_sign"],
|
|
.emoji[data-alias="copyright"],
|
|
.emoji[data-alias="registered"],
|
|
.emoji[data-alias="tm"],
|
|
.emoji[data-alias="heavy_multiplication_x"],
|
|
.emoji[data-alias="heavy_plus_sign"],
|
|
.emoji[data-alias="heavy_minus_sign"],
|
|
.emoji[data-alias="heavy_division_sign"],
|
|
.emoji[data-alias="curly_loop"],
|
|
.emoji[data-alias="loop"],
|
|
.emoji[data-alias="wavy_dash"],
|
|
.emoji[data-alias="feet"],
|
|
.emoji[data-alias="musical_note"],
|
|
.emoji[data-alias="notes"],
|
|
/* v1.27 */
|
|
.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"] {
|
|
filter: invert(100%) hue-rotate(180deg);
|
|
}
|