Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dark_mode_overrides.scss « themes « stylesheets « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 81006c2ad8136678fd29512a11d8171639857461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
@import './themes/dark';
@import '@gitlab/ui/dist/tokens/css/tokens.dark';
@import 'page_bundles/mixins_and_variables_and_functions';

:root {
  color-scheme: dark;

  --dark-icon-color-purple-1: #524a68;
  --dark-icon-color-purple-2: #715bae;
  --dark-icon-color-purple-3: #9a79f7;
  --dark-icon-color-orange-1: #665349;
  --dark-icon-color-orange-2: #b37a5d;

  --gl-text-color: #{$gray-900};
  --border-color: #{$border-color};

  --gray-light: #{$gray-50};

  --svg-status-bg: #{$white};
}

:root.gl-dark {
  // redefine some colors and values to prevent sourcegraph conflicts
  color-scheme: dark;
  --gray-10: #{$gray-10};
  --border-color: #{$border-color};
  --white: #{$white};
  --black: #{$black};
}

.gl-dark {
  .gl-button.gl-button,
  .gl-button.gl-button.btn-block {
    &.btn-default,
    &.btn-dashed,
    &.btn-info,
    &.btn-success,
    &.btn-danger,
    &.btn-confirm {
      &-tertiary {
        mix-blend-mode: screen;
      }
    }
  }

  .gl-datepicker-theme {
    .pika-prev,
    .pika-next {
      filter: invert(0.9);
    }

    .is-selected > .pika-button {
      color: $gray-900;
    }

    :not(.is-selected) > .pika-button:hover {
      background-color: $gray-200;
    }
  }

  .gl-new-dropdown-item {
    &:active,
    &:hover,
    &:focus,
    &:focus:active {
      .gl-new-dropdown-item-content {
        background-color: $gray-10;
      }
    }
  }
}

// Some hacks and overrides for things that don't properly support dark mode
.gl-label {
  filter: brightness(0.9) contrast(1.1);

  // This applies to the gl-label markups
  // rendered and cached in the backend (labels_helper.rb)
  &.gl-label-scoped {
    .gl-label-text-scoped,
    .gl-label-close.gl-button .gl-icon {
      color: $gray-900;
    }
  }
}

// white-ish text for light labels
.gl-label-text-light.gl-label-text-light {
  &,
  .gl-label-close .gl-icon {
    color: $gray-900;
  }
}

.gl-label-text-light .gl-label-close.gl-button:hover {
  background-color: $gray-900;
}

.gl-label-text-dark.gl-label-text-dark {
  &,
  .gl-label-close .gl-icon {
    color: $gray-10;
  }
}

// This applies to "gl-labels" from "gitlab-ui"
.gl-label.gl-label-scoped.gl-label-text-dark,
.gl-label.gl-label-scoped.gl-label-text-light {
  .gl-label-text-scoped,
  .gl-label-close.gl-button .gl-icon {
    color: $gray-900;
  }
}

.gl-label-text-dark .gl-label-close.gl-button:hover {
  background-color: $gray-10;
}

// duplicated class as the original .atwho-view style is added later
.atwho-view.atwho-view {
  background-color: $white;
  color: $gray-900;
  border-color: $gray-800;
}

.gl-avatar:not(.gl-avatar-identicon),
.avatar-container,
.avatar {
  background: rgba($gray-950, 0.04);
}

.gl-avatar {
  @include gl-border-none;
  box-shadow: inset 0 0 0 1px rgba($gray-950, $gl-avatar-border-opacity);
}

aside.right-sidebar:not(.right-sidebar-merge-requests) {
  background-color: $gray-10;
}

:root.gl-dark {
  .terms {
    .logo-text {
      fill: var(--black);
    }
  }

  .md :not(pre.code) > code {
    background-color: $gray-200;
  }
}

.timeline-entry.internal-note:not(.note-form) .timeline-content,
.timeline-entry.draft-note:not(.note-form) .timeline-content {
  // soften on darkmode
  background-color: mix($gray-50, $orange-50, 75%) !important;
}

.tanuki-bot-chat-drawer .tanuki-bot-message {
  // lightens chat bubble in darkmode as $gray-50 matches drawer background.  See tanuki_bot_chat.scss
  background-color: $gray-100;
}

.ai-genie-chat,
.ai-genie-chat .gl-form-input {
  background-color: $gray-10;
}