@gitlab/ui 40.6.0 → 40.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/components/base/form/form_input_group/form_input_group.js +1 -1
- package/dist/components/base/toggle/toggle.js +6 -2
- package/package.json +13 -12
- package/src/components/base/badge/badge.md +3 -2
- package/src/components/base/datepicker/datepicker.stories.js +13 -16
- package/src/components/base/daterange_picker/daterange_picker.stories.js +2 -0
- package/src/components/base/form/form_input_group/form_input_group.vue +33 -35
- package/src/components/base/new_dropdowns/listbox/listbox.stories.js +2 -2
- package/src/components/base/toggle/toggle.spec.js +8 -6
- package/src/components/base/toggle/toggle.vue +5 -2
- package/src/components/charts/legend/legend.stories.js +1 -0
- package/src/scss/storybook.scss +2 -0
- package/src/scss/storybook_dark_mode.scss +23 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [40.6.3](https://gitlab.com/gitlab-org/gitlab-ui/compare/v40.6.2...v40.6.3) (2022-05-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Set story container height with decorator ([672f6f9](https://gitlab.com/gitlab-org/gitlab-ui/commit/672f6f948710db39fad59b6a0da673783ce63bc5))
|
|
7
|
+
|
|
8
|
+
## [40.6.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v40.6.1...v40.6.2) (2022-05-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency dompurify to ^2.3.8 ([77775b9](https://gitlab.com/gitlab-org/gitlab-ui/commit/77775b9a62d3fdf05f90072ce9b3a82b19c18265))
|
|
14
|
+
|
|
15
|
+
## [40.6.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v40.6.0...v40.6.1) (2022-05-19)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **GlToggle:** Show help text from slot ([c531c4c](https://gitlab.com/gitlab-org/gitlab-ui/commit/c531c4c16ea68cd607c57c44778207e983fa59d2))
|
|
21
|
+
|
|
1
22
|
# [40.6.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v40.5.0...v40.6.0) (2022-05-19)
|
|
2
23
|
|
|
3
24
|
|
|
@@ -78,7 +78,7 @@ var script = {
|
|
|
78
78
|
const __vue_script__ = script;
|
|
79
79
|
|
|
80
80
|
/* template */
|
|
81
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('
|
|
81
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-input-group',[(_vm.activeOption || _vm.$scopedSlots.prepend)?_c('b-input-group-prepend',[_vm._t("prepend"),_vm._v(" "),(_vm.activeOption)?_c('gl-dropdown',{attrs:{"text":_vm.activeOption}},_vm._l((_vm.predefinedOptions),function(option){return _c('gl-dropdown-item',{key:option.value,attrs:{"is-check-item":"","is-checked":_vm.activeOption === option.name},on:{"click":function($event){return _vm.updateValue(option)}}},[_vm._v("\n "+_vm._s(option.name)+"\n ")])}),1):_vm._e()],2):_vm._e(),_vm._v(" "),_vm._t("default",[_c('b-form-input',_vm._g(_vm._b({ref:"input",class:['gl-form-input', _vm.inputClass],attrs:{"aria-label":_vm.label},on:{"click":_vm.handleClick},model:{value:(_vm.localValue),callback:function ($$v) {_vm.localValue=$$v;},expression:"localValue"}},'b-form-input',_vm.$attrs,false),_vm.$listeners))]),_vm._v(" "),(_vm.$scopedSlots.append)?_c('b-input-group-append',[_vm._t("append")],2):_vm._e()],2)};
|
|
82
82
|
var __vue_staticRenderFns__ = [];
|
|
83
83
|
|
|
84
84
|
/* style */
|
|
@@ -88,12 +88,16 @@ var script = {
|
|
|
88
88
|
},
|
|
89
89
|
|
|
90
90
|
computed: {
|
|
91
|
+
shouldRenderHelp() {
|
|
92
|
+
return Boolean(this.$slots.help || this.help);
|
|
93
|
+
},
|
|
94
|
+
|
|
91
95
|
icon() {
|
|
92
96
|
return this.value ? 'mobile-issue-close' : 'close';
|
|
93
97
|
},
|
|
94
98
|
|
|
95
99
|
helpId() {
|
|
96
|
-
return this.
|
|
100
|
+
return this.shouldRenderHelp ? `toggle-help-${this.uuid}` : undefined;
|
|
97
101
|
},
|
|
98
102
|
|
|
99
103
|
isChecked() {
|
|
@@ -131,7 +135,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
131
135
|
'gl-toggle': true,
|
|
132
136
|
'is-checked': _vm.value,
|
|
133
137
|
'is-disabled': _vm.disabled,
|
|
134
|
-
},attrs:{"role":"switch","aria-checked":_vm.isChecked,"aria-labelledby":_vm.labelId,"aria-describedby":_vm.helpId,"type":"button"},on:{"click":function($event){$event.preventDefault();return _vm.toggleFeature($event)}}},[(_vm.isLoading)?_c('gl-loading-icon',{staticClass:"toggle-loading",attrs:{"color":"light"}}):_c('span',{class:{ 'toggle-icon': true, disabled: _vm.disabled }},[_c('gl-icon',{attrs:{"name":_vm.icon,"size":16}})],1)],1),_vm._v(" "),(_vm.
|
|
138
|
+
},attrs:{"role":"switch","aria-checked":_vm.isChecked,"aria-labelledby":_vm.labelId,"aria-describedby":_vm.helpId,"type":"button"},on:{"click":function($event){$event.preventDefault();return _vm.toggleFeature($event)}}},[(_vm.isLoading)?_c('gl-loading-icon',{staticClass:"toggle-loading",attrs:{"color":"light"}}):_c('span',{class:{ 'toggle-icon': true, disabled: _vm.disabled }},[_c('gl-icon',{attrs:{"name":_vm.icon,"size":16}})],1)],1),_vm._v(" "),(_vm.shouldRenderHelp)?_c('span',{staticClass:"gl-help-label",attrs:{"id":_vm.helpId,"data-testid":"toggle-help"}},[_vm._t("help",[_vm._v(_vm._s(_vm.help))])],2):_vm._e()])};
|
|
135
139
|
var __vue_staticRenderFns__ = [];
|
|
136
140
|
|
|
137
141
|
/* style */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "40.6.
|
|
3
|
+
"version": "40.6.3",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@popperjs/core": "^2.11.2",
|
|
59
59
|
"bootstrap-vue": "2.20.1",
|
|
60
|
-
"dompurify": "^2.3.
|
|
60
|
+
"dompurify": "^2.3.8",
|
|
61
61
|
"echarts": "^5.2.1",
|
|
62
62
|
"iframe-resizer": "^4.3.2",
|
|
63
63
|
"lodash": "^4.17.20",
|
|
@@ -81,21 +81,21 @@
|
|
|
81
81
|
"@arkweid/lefthook": "0.7.7",
|
|
82
82
|
"@babel/core": "^7.10.2",
|
|
83
83
|
"@babel/preset-env": "^7.10.2",
|
|
84
|
-
"@gitlab/eslint-plugin": "12.
|
|
84
|
+
"@gitlab/eslint-plugin": "12.3.0",
|
|
85
85
|
"@gitlab/stylelint-config": "4.0.0",
|
|
86
86
|
"@gitlab/svgs": "2.14.0",
|
|
87
87
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
88
88
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
89
89
|
"@rollup/plugin-replace": "^2.3.2",
|
|
90
|
-
"@storybook/addon-a11y": "6.5.
|
|
91
|
-
"@storybook/addon-docs": "6.5.
|
|
92
|
-
"@storybook/addon-essentials": "6.5.
|
|
90
|
+
"@storybook/addon-a11y": "6.5.4",
|
|
91
|
+
"@storybook/addon-docs": "6.5.4",
|
|
92
|
+
"@storybook/addon-essentials": "6.5.4",
|
|
93
93
|
"@storybook/addon-knobs": "6.4.0",
|
|
94
|
-
"@storybook/addon-storyshots": "6.5.
|
|
95
|
-
"@storybook/addon-storyshots-puppeteer": "6.5.
|
|
96
|
-
"@storybook/addon-viewport": "6.5.
|
|
97
|
-
"@storybook/theming": "6.5.
|
|
98
|
-
"@storybook/vue": "6.5.
|
|
94
|
+
"@storybook/addon-storyshots": "6.5.4",
|
|
95
|
+
"@storybook/addon-storyshots-puppeteer": "6.5.4",
|
|
96
|
+
"@storybook/addon-viewport": "6.5.4",
|
|
97
|
+
"@storybook/theming": "6.5.4",
|
|
98
|
+
"@storybook/vue": "6.5.4",
|
|
99
99
|
"@vue/test-utils": "1.3.0",
|
|
100
100
|
"autoprefixer": "^9.7.6",
|
|
101
101
|
"babel-jest": "^26.6.3",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"eslint": "7.32.0",
|
|
110
110
|
"eslint-import-resolver-jest": "3.0.2",
|
|
111
111
|
"eslint-plugin-cypress": "2.12.1",
|
|
112
|
-
"eslint-plugin-storybook": "0.5.
|
|
112
|
+
"eslint-plugin-storybook": "0.5.12",
|
|
113
113
|
"file-loader": "^4.2.0",
|
|
114
114
|
"glob": "^7.2.0",
|
|
115
115
|
"identity-obj-proxy": "^3.0.0",
|
|
@@ -140,6 +140,7 @@
|
|
|
140
140
|
"sass-loader": "^10.2.0",
|
|
141
141
|
"sass-true": "^5.0.0",
|
|
142
142
|
"start-server-and-test": "^1.10.6",
|
|
143
|
+
"storybook-dark-mode": "^1.0.8",
|
|
143
144
|
"stylelint": "14.3.0",
|
|
144
145
|
"stylelint-config-prettier": "9.0.3",
|
|
145
146
|
"stylelint-prettier": "2.0.0",
|
|
@@ -31,7 +31,8 @@ While this component is based on
|
|
|
31
31
|
|
|
32
32
|
- Has a different set of valid `variant`s. See the examples or props
|
|
33
33
|
documentation for those values.
|
|
34
|
-
- Always sets the `pill` prop of the underlying
|
|
34
|
+
- Always sets the `pill` prop of the underlying
|
|
35
|
+
[`BBadge`](https://bootstrap-vue.org/docs/components/badge) to `true`. Any passed
|
|
35
36
|
in `pill` prop value is ignored.
|
|
36
37
|
- Does _not_ scale itself to match the size of its immediate parent, like
|
|
37
|
-
`BBadge` does.
|
|
38
|
+
[`BBadge`](https://bootstrap-vue.org/docs/components/badge) does.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GlDatepicker } from '../../../index';
|
|
2
2
|
import { disableControls } from '../../../utils/stories_utils';
|
|
3
3
|
import { useFakeDate } from '../../../utils/use_fake_date';
|
|
4
|
+
import { makeContainer } from '../../../utils/story_decorators/container';
|
|
4
5
|
import readme from './datepicker.md';
|
|
5
6
|
|
|
6
7
|
const defaults = {
|
|
@@ -18,8 +19,6 @@ const generateProps = ({ minDate = defaultMinDate, maxDate = defaultMaxDate } =
|
|
|
18
19
|
maxDate,
|
|
19
20
|
});
|
|
20
21
|
|
|
21
|
-
const wrap = (template) => `<div style="height: 280px">${template}</div>`;
|
|
22
|
-
|
|
23
22
|
export const Default = (_args, { argTypes }) => ({
|
|
24
23
|
...defaults,
|
|
25
24
|
props: Object.keys(argTypes),
|
|
@@ -28,9 +27,7 @@ export const Default = (_args, { argTypes }) => ({
|
|
|
28
27
|
pickerValue: defaultDate,
|
|
29
28
|
};
|
|
30
29
|
},
|
|
31
|
-
template:
|
|
32
|
-
<gl-datepicker :max-date="maxDate" :min-date="minDate" :start-opened="true" v-model="pickerValue" />
|
|
33
|
-
`),
|
|
30
|
+
template: `<gl-datepicker :max-date="maxDate" :min-date="minDate" :start-opened="true" v-model="pickerValue" />`,
|
|
34
31
|
});
|
|
35
32
|
Default.args = generateProps();
|
|
36
33
|
|
|
@@ -42,14 +39,15 @@ export const CustomTrigger = (_args, { argTypes }) => ({
|
|
|
42
39
|
pickerValue: null,
|
|
43
40
|
};
|
|
44
41
|
},
|
|
45
|
-
template:
|
|
46
|
-
<div
|
|
47
|
-
<
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
template: `
|
|
43
|
+
<div>
|
|
44
|
+
<div class="dropdown">
|
|
45
|
+
<button type="button" class="dropdown-menu-toggle">
|
|
46
|
+
<span class="dropdown-toggle-text"> Start date: {{value}} </span>
|
|
47
|
+
</button>
|
|
48
|
+
</div>
|
|
49
|
+
<gl-datepicker v-model="pickerValue" target=".dropdown-menu-toggle" :container="null" />
|
|
50
|
+
</div>`,
|
|
53
51
|
});
|
|
54
52
|
CustomTrigger.args = generateProps();
|
|
55
53
|
|
|
@@ -61,15 +59,14 @@ export const WithClearButton = (_args, { argTypes }) => ({
|
|
|
61
59
|
pickerValue: defaultDate,
|
|
62
60
|
};
|
|
63
61
|
},
|
|
64
|
-
template:
|
|
65
|
-
<gl-datepicker showClearButton :max-date="maxDate" :min-date="minDate" v-model="pickerValue" />
|
|
66
|
-
`),
|
|
62
|
+
template: `<gl-datepicker showClearButton :max-date="maxDate" :min-date="minDate" v-model="pickerValue" />`,
|
|
67
63
|
});
|
|
68
64
|
WithClearButton.args = generateProps();
|
|
69
65
|
|
|
70
66
|
export default {
|
|
71
67
|
title: 'base/datepicker',
|
|
72
68
|
component: GlDatepicker,
|
|
69
|
+
decorators: [makeContainer({ height: '280px' })],
|
|
73
70
|
parameters: {
|
|
74
71
|
docs: {
|
|
75
72
|
description: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { disableControls } from '../../../utils/stories_utils';
|
|
2
|
+
import { makeContainer } from '../../../utils/story_decorators/container';
|
|
2
3
|
import readme from './daterange_picker.md';
|
|
3
4
|
import GlDaterangePicker from './daterange_picker.vue';
|
|
4
5
|
|
|
@@ -113,6 +114,7 @@ export default {
|
|
|
113
114
|
followsDesignSystem: true,
|
|
114
115
|
title: 'base/daterange-picker',
|
|
115
116
|
component: GlDaterangePicker,
|
|
117
|
+
decorators: [makeContainer({ height: '300px' })],
|
|
116
118
|
parameters: {
|
|
117
119
|
knobs: { disable: true },
|
|
118
120
|
docs: {
|
|
@@ -64,39 +64,37 @@ export default {
|
|
|
64
64
|
};
|
|
65
65
|
</script>
|
|
66
66
|
<template>
|
|
67
|
-
<
|
|
68
|
-
<b-input-group>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<gl-dropdown
|
|
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
|
-
</b-input-group>
|
|
101
|
-
</div>
|
|
67
|
+
<b-input-group>
|
|
68
|
+
<b-input-group-prepend v-if="activeOption || $scopedSlots.prepend">
|
|
69
|
+
<!-- @slot Is rendered in front of the input field. -->
|
|
70
|
+
<slot name="prepend"></slot>
|
|
71
|
+
<gl-dropdown v-if="activeOption" :text="activeOption">
|
|
72
|
+
<gl-dropdown-item
|
|
73
|
+
v-for="option in predefinedOptions"
|
|
74
|
+
:key="option.value"
|
|
75
|
+
is-check-item
|
|
76
|
+
:is-checked="activeOption === option.name"
|
|
77
|
+
@click="updateValue(option)"
|
|
78
|
+
>
|
|
79
|
+
{{ option.name }}
|
|
80
|
+
</gl-dropdown-item>
|
|
81
|
+
</gl-dropdown>
|
|
82
|
+
</b-input-group-prepend>
|
|
83
|
+
<!-- @slot Allows replacement of default input field. -->
|
|
84
|
+
<slot>
|
|
85
|
+
<b-form-input
|
|
86
|
+
ref="input"
|
|
87
|
+
v-model="localValue"
|
|
88
|
+
:class="['gl-form-input', inputClass]"
|
|
89
|
+
:aria-label="label"
|
|
90
|
+
v-bind="$attrs"
|
|
91
|
+
v-on="$listeners"
|
|
92
|
+
@click="handleClick"
|
|
93
|
+
/>
|
|
94
|
+
</slot>
|
|
95
|
+
<b-input-group-append v-if="$scopedSlots.append">
|
|
96
|
+
<!-- @slot Is rendered after the input field. -->
|
|
97
|
+
<slot name="append"></slot>
|
|
98
|
+
</b-input-group-append>
|
|
99
|
+
</b-input-group>
|
|
102
100
|
</template>
|
|
@@ -141,7 +141,7 @@ export const Default = (args, { argTypes }) => ({
|
|
|
141
141
|
template: template('', `<span class="gl-my-0" id="listbox-label">Select a department</span>`),
|
|
142
142
|
});
|
|
143
143
|
Default.args = generateProps({ ariaLabelledby: 'listbox-label' });
|
|
144
|
-
Default.decorators = [makeContainer({ height: '
|
|
144
|
+
Default.decorators = [makeContainer({ height: '370px' })];
|
|
145
145
|
|
|
146
146
|
export const HeaderAndFooter = (args, { argTypes }) => ({
|
|
147
147
|
props: Object.keys(argTypes),
|
|
@@ -178,7 +178,7 @@ export const HeaderAndFooter = (args, { argTypes }) => ({
|
|
|
178
178
|
</template>`),
|
|
179
179
|
});
|
|
180
180
|
HeaderAndFooter.args = generateProps({ toggleText: 'Header and Footer', multiple: true });
|
|
181
|
-
HeaderAndFooter.decorators = [makeContainer({ height: '
|
|
181
|
+
HeaderAndFooter.decorators = [makeContainer({ height: '370px' })];
|
|
182
182
|
|
|
183
183
|
export const CustomListItem = (args, { argTypes }) => ({
|
|
184
184
|
props: Object.keys(argTypes),
|
|
@@ -10,12 +10,13 @@ describe('toggle', () => {
|
|
|
10
10
|
const label = 'toggle label';
|
|
11
11
|
const helpText = 'help text';
|
|
12
12
|
|
|
13
|
-
const createWrapper = (props = {}) => {
|
|
13
|
+
const createWrapper = (props = {}, options = {}) => {
|
|
14
14
|
wrapper = shallowMount(Toggle, {
|
|
15
15
|
propsData: {
|
|
16
16
|
label,
|
|
17
17
|
...props,
|
|
18
18
|
},
|
|
19
|
+
...options,
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
22
|
|
|
@@ -85,12 +86,13 @@ describe('toggle', () => {
|
|
|
85
86
|
});
|
|
86
87
|
|
|
87
88
|
describe.each`
|
|
88
|
-
state
|
|
89
|
-
${'with help'}
|
|
90
|
-
${'
|
|
91
|
-
|
|
89
|
+
state | help | props | options | getAriaDescribedBy
|
|
90
|
+
${'with help'} | ${helpText} | ${{ help: helpText }} | ${undefined} | ${() => findHelpElement().attributes('id')}
|
|
91
|
+
${'with help in slot'} | ${helpText} | ${undefined} | ${{ slots: { help: helpText } }} | ${() => findHelpElement().attributes('id')}
|
|
92
|
+
${'without help'} | ${undefined} | ${undefined} | ${undefined} | ${() => undefined}
|
|
93
|
+
`('$state', ({ help, props, options, getAriaDescribedBy }) => {
|
|
92
94
|
beforeEach(() => {
|
|
93
|
-
createWrapper(
|
|
95
|
+
createWrapper(props, options);
|
|
94
96
|
});
|
|
95
97
|
|
|
96
98
|
it(`${help ? 'shows' : 'does not show'} help`, () => {
|
|
@@ -81,11 +81,14 @@ export default {
|
|
|
81
81
|
};
|
|
82
82
|
},
|
|
83
83
|
computed: {
|
|
84
|
+
shouldRenderHelp() {
|
|
85
|
+
return Boolean(this.$slots.help || this.help);
|
|
86
|
+
},
|
|
84
87
|
icon() {
|
|
85
88
|
return this.value ? 'mobile-issue-close' : 'close';
|
|
86
89
|
},
|
|
87
90
|
helpId() {
|
|
88
|
-
return this.
|
|
91
|
+
return this.shouldRenderHelp ? `toggle-help-${this.uuid}` : undefined;
|
|
89
92
|
},
|
|
90
93
|
isChecked() {
|
|
91
94
|
return this.value ? 'true' : 'false';
|
|
@@ -146,7 +149,7 @@ export default {
|
|
|
146
149
|
<gl-icon :name="icon" :size="16" />
|
|
147
150
|
</span>
|
|
148
151
|
</button>
|
|
149
|
-
<span v-if="
|
|
152
|
+
<span v-if="shouldRenderHelp" :id="helpId" class="gl-help-label" data-testid="toggle-help">
|
|
150
153
|
<!-- @slot A help text to be shown below the toggle. -->
|
|
151
154
|
<slot name="help">{{ help }}</slot>
|
|
152
155
|
</span>
|
package/src/scss/storybook.scss
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// conditional overrides for dark mode for use in storybook.
|
|
2
|
+
// Because we only use application.css from gitlab (and not
|
|
3
|
+
// application_dark), we need to override some base rules so
|
|
4
|
+
// that we can more easily test components in dark mode
|
|
5
|
+
|
|
6
|
+
// This is because dark mode in gitlab currently depends on
|
|
7
|
+
// overriding SCSS variables, but we want gitlab-ui dark mode
|
|
8
|
+
// to use Custom Properties instead
|
|
9
|
+
|
|
10
|
+
.gl-dark {
|
|
11
|
+
--color-body-bg: #1f1f1f;
|
|
12
|
+
--color-body-text: #fff;
|
|
13
|
+
|
|
14
|
+
color-scheme: dark;
|
|
15
|
+
|
|
16
|
+
&,
|
|
17
|
+
body {
|
|
18
|
+
// We can delete these once $body-bg and $body-color
|
|
19
|
+
// variables in variables.scss are updated to use CSS custom properties
|
|
20
|
+
background-color: var(--color-body-bg);
|
|
21
|
+
color: var(--color-body-text);
|
|
22
|
+
}
|
|
23
|
+
}
|