dumi 2.0.18 → 2.1.1

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.
Files changed (49) hide show
  1. package/dist/client/theme-api/context.d.ts +1 -1
  2. package/dist/client/theme-api/index.d.ts +1 -0
  3. package/dist/client/theme-api/index.js +1 -0
  4. package/dist/client/theme-api/types.d.ts +4 -0
  5. package/dist/client/theme-api/usePrefersColor.d.ts +7 -0
  6. package/dist/client/theme-api/usePrefersColor.js +199 -0
  7. package/dist/constants.d.ts +2 -0
  8. package/dist/constants.js +6 -0
  9. package/dist/features/configPlugins/index.js +2 -1
  10. package/dist/features/derivative.js +7 -5
  11. package/dist/features/routes.js +6 -3
  12. package/dist/features/sitemap.js +1 -1
  13. package/dist/features/theme/index.js +20 -0
  14. package/dist/loaders/markdown/transformer/rehypeDemo.js +1 -1
  15. package/dist/types.d.ts +15 -7
  16. package/package.json +1 -1
  17. package/theme-default/builtins/Badge/index.less +20 -0
  18. package/theme-default/builtins/Container/index.less +29 -28
  19. package/theme-default/builtins/Previewer/index.less +48 -1
  20. package/theme-default/builtins/SourceCode/index.less +40 -1
  21. package/theme-default/builtins/Table/index.less +2 -2
  22. package/theme-default/layouts/DocLayout/index.less +26 -0
  23. package/theme-default/locales/en-US.json +3 -1
  24. package/theme-default/locales/zh-CN.json +3 -1
  25. package/theme-default/slots/ColorSwitch/index.d.ts +4 -0
  26. package/theme-default/slots/ColorSwitch/index.js +86 -0
  27. package/theme-default/slots/ColorSwitch/index.less +58 -0
  28. package/theme-default/slots/Content/index.less +45 -0
  29. package/theme-default/slots/ContentTabs/index.less +20 -0
  30. package/theme-default/slots/Features/index.less +18 -0
  31. package/theme-default/slots/Footer/index.less +9 -0
  32. package/theme-default/slots/Header/index.js +6 -2
  33. package/theme-default/slots/Header/index.less +21 -0
  34. package/theme-default/slots/Hero/index.less +17 -0
  35. package/theme-default/slots/HeroTitle/index.less +4 -0
  36. package/theme-default/slots/LangSwitch/index.js +3 -1
  37. package/theme-default/slots/LangSwitch/index.less +17 -1
  38. package/theme-default/slots/Logo/index.less +4 -0
  39. package/theme-default/slots/Navbar/index.less +12 -0
  40. package/theme-default/slots/NotFound/index.less +9 -0
  41. package/theme-default/slots/PreviewerActions/index.less +45 -1
  42. package/theme-default/slots/RtlSwitch/index.js +24 -4
  43. package/theme-default/slots/RtlSwitch/index.less +29 -3
  44. package/theme-default/slots/SearchBar/index.less +43 -0
  45. package/theme-default/slots/SearchResult/index.less +48 -2
  46. package/theme-default/slots/Sidebar/index.less +25 -0
  47. package/theme-default/slots/Toc/index.less +17 -0
  48. package/theme-default/styles/utils.less +14 -2
  49. package/theme-default/styles/variables.less +17 -0
@@ -10,10 +10,18 @@
10
10
  background-color: fadeout(@c-site-bg, 10%);
11
11
  backdrop-filter: blur(6px);
12
12
 
13
+ @{dark-selector} & {
14
+ background-color: fadeout(@c-site-bg-dark, 10%);
15
+ }
16
+
13
17
  // to avoid backdrop filter conflict with navbar overlay
14
18
  &[data-mobile-active] {
15
19
  background-color: @c-site-bg;
16
20
  backdrop-filter: none;
21
+
22
+ @{dark-selector} & {
23
+ background-color: @c-site-bg-dark;
24
+ }
17
25
  }
18
26
  }
19
27
 
@@ -49,6 +57,10 @@
49
57
  padding-top: 24px;
50
58
  justify-content: center;
51
59
  border-top: 1px solid @c-border-light;
60
+
61
+ @{dark-selector} & {
62
+ border-top-color: @c-border-less-dark;
63
+ }
52
64
  }
53
65
  }
54
66
 
@@ -65,6 +77,11 @@
65
77
  box-sizing: border-box;
66
78
  transition: all 0.2s;
67
79
 
80
+ @{dark-selector} & {
81
+ background-color: fadeout(@c-site-bg-dark, 40%);
82
+ border-top: 1px solid @c-border-less-dark;
83
+ }
84
+
68
85
  .@{prefix}-header:not([data-mobile-active]) & {
69
86
  opacity: 0;
70
87
  visibility: hidden;
@@ -90,6 +107,10 @@
90
107
  > svg {
91
108
  width: 20px;
92
109
  fill: @c-text-secondary;
110
+
111
+ @{dark-selector} & {
112
+ fill: @c-text-secondary-dark;
113
+ }
93
114
  }
94
115
  }
95
116
  }
@@ -31,6 +31,10 @@
31
31
  pointer-events: none;
32
32
  background: no-repeat center/cover;
33
33
  background-image: url('https://gw.alipayobjects.com/zos/bmw-prod/a6c3488a-994c-4dd3-8e92-2324d9a1ca48/l9dmd9wl_w2858_h1864.png');
34
+
35
+ @{dark-selector} & {
36
+ opacity: 1;
37
+ }
34
38
  }
35
39
 
36
40
  > p {
@@ -39,6 +43,10 @@
39
43
  font-size: 20px;
40
44
  line-height: 1.6;
41
45
 
46
+ @{dark-selector} & {
47
+ color: @c-text-secondary-dark;
48
+ }
49
+
42
50
  @media @mobile {
43
51
  font-size: 16px;
44
52
  }
@@ -75,11 +83,20 @@
75
83
  margin-inline-start: 48px;
76
84
  color: @c-primary;
77
85
  border: 1px solid @c-primary;
86
+
87
+ @{dark-selector} & {
88
+ color: @c-primary-dark;
89
+ border-color: @c-primary-dark;
90
+ }
78
91
  }
79
92
 
80
93
  &:first-child {
81
94
  color: #fff;
82
95
  background-color: @c-primary;
96
+
97
+ @{dark-selector} & {
98
+ background-color: @c-primary-dark;
99
+ }
83
100
  }
84
101
  }
85
102
  }
@@ -24,4 +24,8 @@
24
24
  @media @mobile {
25
25
  font-size: 60px;
26
26
  }
27
+
28
+ @{dark-selector} & {
29
+ opacity: 0.7;
30
+ }
27
31
  }
@@ -20,7 +20,9 @@ function getTargetLocalePath(_ref) {
20
20
  current = _ref.current,
21
21
  target = _ref.target;
22
22
  var clearPath = 'base' in current ? pathname.replace(current.base.replace(/\/$/, ''), '') : pathname.replace(new RegExp("".concat(current.suffix, "$")), '');
23
- return 'base' in target ? "".concat(target.base).concat(clearPath).replace(/^\/\//, '/') : "".concat(clearPath).concat(target.suffix);
23
+ return 'base' in target ? "".concat( // for `/` base, strip duplicated leading slash
24
+ target.base.replace(/\/$/, '')).concat(clearPath) // for `/` clearPath, strip duplicated ending slash
25
+ .replace(/([^/])\/$/, '$1') : "".concat(clearPath).concat(target.suffix);
24
26
  }
25
27
 
26
28
  var SingleSwitch = function SingleSwitch(_ref2) {
@@ -3,13 +3,21 @@
3
3
  .@{prefix}-lang-switch {
4
4
  color: @c-text-secondary;
5
5
  font-size: 14px;
6
- line-height: 1;
6
+ line-height: 16px;
7
7
  text-decoration: none;
8
8
  transition: all 0.3s;
9
9
  cursor: pointer;
10
10
 
11
+ @{dark-selector} & {
12
+ color: @c-text-secondary-dark;
13
+ }
14
+
11
15
  &:hover {
12
16
  color: @c-primary;
17
+
18
+ @{dark-selector} & {
19
+ color: @c-primary-dark;
20
+ }
13
21
  }
14
22
  }
15
23
 
@@ -28,6 +36,10 @@
28
36
  line-height: 1;
29
37
  border: 0;
30
38
  background-color: transparent;
39
+
40
+ @{dark-selector} & {
41
+ color: @c-text-secondary-dark;
42
+ }
31
43
  }
32
44
 
33
45
  > svg {
@@ -35,5 +47,9 @@
35
47
  width: 12px;
36
48
  fill: darken(@c-border, 10%);
37
49
  pointer-events: none;
50
+
51
+ @{dark-selector} & {
52
+ fill: lighten(@c-border-dark, 10%);
53
+ }
38
54
  }
39
55
  }
@@ -9,6 +9,10 @@
9
9
  font-weight: 500;
10
10
  text-decoration: none;
11
11
 
12
+ @{dark-selector} & {
13
+ color: @c-text-dark;
14
+ }
15
+
12
16
  @media @mobile {
13
17
  font-size: 18px;
14
18
 
@@ -26,13 +26,25 @@
26
26
  text-decoration: none;
27
27
  transition: all 0.3s;
28
28
 
29
+ @{dark-selector} & {
30
+ color: @c-text-secondary-dark;
31
+ }
32
+
29
33
  &:hover {
30
34
  color: @c-primary;
35
+
36
+ @{dark-selector} & {
37
+ color: @c-primary-dark;
38
+ }
31
39
  }
32
40
 
33
41
  &.active {
34
42
  color: @c-text;
35
43
  font-weight: 500;
44
+
45
+ @{dark-selector} & {
46
+ color: @c-text-dark;
47
+ }
36
48
  }
37
49
  }
38
50
 
@@ -14,11 +14,20 @@
14
14
  font-size: 78px;
15
15
  font-weight: 700;
16
16
  text-shadow: -1px -1px 0 @c-border;
17
+
18
+ @{dark-selector} & {
19
+ color: @c-border-less-dark;
20
+ text-shadow: -1px -1px 0 @c-border-dark;
21
+ }
17
22
  }
18
23
 
19
24
  > a {
20
25
  color: @c-primary;
21
26
 
27
+ @{dark-selector} & {
28
+ color: @c-primary-dark;
29
+ }
30
+
22
31
  &:not(:hover) {
23
32
  text-decoration: none;
24
33
  }
@@ -10,6 +10,10 @@
10
10
 
11
11
  &:not(:last-child) {
12
12
  border-bottom: 1px dashed @c-border-light;
13
+
14
+ @{dark-selector} & {
15
+ border-bottom-color: @c-border-less-dark;
16
+ }
13
17
  }
14
18
  }
15
19
 
@@ -28,10 +32,18 @@
28
32
  width: 16px;
29
33
  fill: darken(@c-border, 20%);
30
34
  transition: fill 0.2s;
35
+
36
+ @{dark-selector} & {
37
+ fill: lighten(@c-border-dark, 20%);
38
+ }
31
39
  }
32
40
 
33
41
  &:hover > svg {
34
42
  fill: darken(@c-border, 30%);
43
+
44
+ @{dark-selector} & {
45
+ fill: lighten(@c-border-dark, 30%);
46
+ }
35
47
  }
36
48
 
37
49
  &:not(:last-child) {
@@ -51,6 +63,10 @@
51
63
  width: 100%;
52
64
  height: 0;
53
65
  border-bottom: 1px dashed @c-border-light;
66
+
67
+ @{dark-selector} & {
68
+ border-bottom-color: @c-border-less-dark;
69
+ }
54
70
  }
55
71
  }
56
72
  }
@@ -115,13 +131,25 @@
115
131
  cursor: pointer;
116
132
  transition: all 0.2s;
117
133
 
134
+ @{dark-selector} & {
135
+ color: @c-text-secondary-dark;
136
+ }
137
+
118
138
  &:hover {
119
139
  color: @c-text;
140
+
141
+ @{dark-selector} & {
142
+ color: @c-text-dark;
143
+ }
120
144
  }
121
145
  }
122
146
 
123
147
  &-active &-btn {
124
148
  color: @c-text;
149
+
150
+ @{dark-selector} & {
151
+ color: @c-text-dark;
152
+ }
125
153
  }
126
154
  }
127
155
 
@@ -131,15 +159,23 @@
131
159
  background: @c-primary;
132
160
  transition: left 0.2s, width 0.2s;
133
161
  pointer-events: none;
162
+
163
+ @{dark-selector} & {
164
+ background: @c-primary-dark;
165
+ }
134
166
  }
135
167
 
136
168
  &-dropdown {
137
169
  position: absolute;
138
- background: #fff;
170
+ background: inherit;
139
171
  border: 1px solid @c-border;
140
172
  max-height: 200px;
141
173
  overflow: auto;
142
174
 
175
+ @{dark-selector} & {
176
+ border-color: @c-border-dark;
177
+ }
178
+
143
179
  > ul {
144
180
  list-style: none;
145
181
  margin: 0;
@@ -152,10 +188,18 @@
152
188
 
153
189
  &:hover {
154
190
  color: @c-primary;
191
+
192
+ @{dark-selector} & {
193
+ color: @c-primary-dark;
194
+ }
155
195
  }
156
196
 
157
197
  &:not(:last-child) {
158
198
  border-bottom: 1px dashed @c-border;
199
+
200
+ @{dark-selector} & {
201
+ border-bottom-color: @c-border-dark;
202
+ }
159
203
  }
160
204
  }
161
205
  }
@@ -13,6 +13,23 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { useSiteData } from 'dumi';
14
14
  import React, { useEffect, useState } from 'react';
15
15
  import "./index.less";
16
+
17
+ var IconRtl = function IconRtl() {
18
+ return /*#__PURE__*/React.createElement("svg", {
19
+ viewBox: "0 0 14 16"
20
+ }, /*#__PURE__*/React.createElement("path", {
21
+ d: "M5.003 6.39v3.594c0 .4.275.674.674.674.4 0 .674-.274.674-.674V1.323h1.997v8.661c0 .4.274.674.674.674s.674-.274.674-.674V1.323h3.295c.399 0 .674-.275.674-.674 0-.4-.275-.649-.674-.649H4.928C3.131 0 1.733 1.398 1.733 3.195S3.206 6.39 5.003 6.39Zm0-5.067v3.72c-1.073 0-1.922-.8-1.922-1.873s.799-1.847 1.922-1.847Zm7.988 11.332H2.73l.8-.674c.274-.2.324-.674.124-.923-.2-.275-.674-.325-.923-.125L.735 12.53c-.275.275-.4.525-.4.874 0 .325.125.674.4.874l1.997 1.597a.829.829 0 0 0 .4.125c.199 0 .398-.075.523-.275.2-.274.2-.723-.125-.923l-.998-.799h10.459c.399 0 .674-.274.674-.674 0-.424-.275-.674-.674-.674Z"
22
+ }));
23
+ };
24
+
25
+ var IconLtr = function IconLtr() {
26
+ return /*#__PURE__*/React.createElement("svg", {
27
+ viewBox: "0 0 14 16"
28
+ }, /*#__PURE__*/React.createElement("path", {
29
+ d: "M5.003 6.39v3.594c0 .4.275.674.674.674.4 0 .674-.274.674-.674V1.323h1.997v8.661c0 .4.274.674.674.674s.674-.274.674-.674V1.323h3.295c.399 0 .674-.275.674-.674 0-.4-.275-.649-.674-.649H4.928C3.131 0 1.733 1.398 1.733 3.195S3.206 6.39 5.003 6.39Zm0-5.067v3.72c-1.073 0-1.922-.8-1.922-1.873s.799-1.847 1.922-1.847ZM1.01 12.655h10.26l-.8-.674c-.274-.2-.324-.674-.124-.923.2-.275.674-.325.923-.125l1.997 1.597c.275.275.4.525.4.874 0 .325-.125.674-.4.874l-1.997 1.597a.829.829 0 0 1-.399.125.59.59 0 0 1-.524-.275c-.2-.274-.2-.723.125-.923l.998-.799H1.009c-.399 0-.674-.274-.674-.674 0-.424.275-.674.674-.674Z"
30
+ }));
31
+ };
32
+
16
33
  var LS_RTL_KEY = 'dumi:rtl';
17
34
 
18
35
  var RtlSwitch = function RtlSwitch() {
@@ -31,8 +48,9 @@ var RtlSwitch = function RtlSwitch() {
31
48
  }
32
49
  }, []);
33
50
  if (!themeConfig.rtl) return null;
34
- return /*#__PURE__*/React.createElement("span", {
35
- className: "dumi-default-lang-switch",
51
+ return /*#__PURE__*/React.createElement("button", {
52
+ type: "button",
53
+ className: "dumi-default-rtl-switch",
36
54
  onClick: function onClick() {
37
55
  if (rtl) {
38
56
  document.documentElement.removeAttribute('data-direction');
@@ -43,8 +61,10 @@ var RtlSwitch = function RtlSwitch() {
43
61
  }
44
62
 
45
63
  setRtl(!rtl);
46
- }
47
- }, rtl ? 'LTR' : 'RTL');
64
+ },
65
+ "data-dumi-tooltip": rtl ? 'RTL' : 'LTR',
66
+ "data-dumi-tooltip-bottom": true
67
+ }, rtl ? /*#__PURE__*/React.createElement(IconRtl, null) : /*#__PURE__*/React.createElement(IconLtr, null));
48
68
  };
49
69
 
50
70
  export default RtlSwitch;
@@ -1,8 +1,34 @@
1
1
  @import '../LangSwitch/index.less';
2
2
 
3
- .@{prefix}-lang-switch {
4
- & + & {
5
- margin-inline-start: 20px;
3
+ .@{prefix}-rtl-switch {
4
+ height: 16px;
5
+ appearance: none;
6
+ border: 0;
7
+ background-color: transparent;
8
+ cursor: pointer;
9
+
10
+ [class*='-switch'] + & {
11
+ margin-inline-start: 15px;
12
+ margin-inline-end: -15px;
13
+ padding-inline: 15px;
14
+ border-inline-start: 1px solid @c-border-light;
15
+ }
16
+
17
+ > svg {
18
+ height: 16px;
19
+ fill: @c-text-secondary;
20
+
21
+ @{dark-selector} & {
22
+ fill: @c-text-secondary-dark;
23
+ }
24
+ }
25
+
26
+ &:hover svg {
27
+ fill: @c-primary;
28
+
29
+ @{dark-selector} & {
30
+ fill: @c-primary-dark;
31
+ }
6
32
  }
7
33
  }
8
34
 
@@ -20,6 +20,10 @@
20
20
  width: 16px;
21
21
  fill: @c-text-note;
22
22
  transform: translateY(-50%);
23
+
24
+ @{dark-selector} & {
25
+ fill: @c-text-note-dark;
26
+ }
23
27
  }
24
28
 
25
29
  &-input {
@@ -37,11 +41,22 @@
37
41
  transition: all 0.3s;
38
42
  background-color: transparent;
39
43
 
44
+ @{dark-selector} & {
45
+ color: @c-text-dark;
46
+ border-color: @c-border-dark;
47
+ }
48
+
40
49
  &:focus {
41
50
  border-color: fade(@c-primary, 50%);
42
51
  background-color: #fff;
43
52
  box-shadow: 0 0 0 3px fade(@c-primary, 10%);
44
53
 
54
+ @{dark-selector} & {
55
+ border-color: fade(@c-primary-dark, 50%);
56
+ background-color: @c-site-bg-dark;
57
+ box-shadow: 0 0 0 3px fade(@c-primary-dark, 10%);
58
+ }
59
+
45
60
  ~ .@{prefix}-search-shortcut {
46
61
  opacity: 0;
47
62
  }
@@ -65,6 +80,11 @@
65
80
  transition: all 0.3s;
66
81
  pointer-events: none;
67
82
 
83
+ @{dark-selector} & {
84
+ background-color: fade(#000, 20%);
85
+ border-color: @c-border-dark;
86
+ }
87
+
68
88
  @media @mobile {
69
89
  display: none;
70
90
  }
@@ -83,6 +103,10 @@
83
103
  border-radius: 8px;
84
104
  box-shadow: 0 4px 30px rgba(0, 0, 0, 20%);
85
105
 
106
+ @{dark-selector} & {
107
+ background-color: lighten(@c-site-bg-dark, 6%);
108
+ }
109
+
86
110
  &::before {
87
111
  content: '';
88
112
  position: absolute;
@@ -93,6 +117,10 @@
93
117
  height: 0;
94
118
  border: 8px solid transparent;
95
119
  border-bottom-color: #fff;
120
+
121
+ @{dark-selector} & {
122
+ border-bottom-color: lighten(@c-site-bg-dark, 6%);
123
+ }
96
124
  }
97
125
 
98
126
  > section {
@@ -134,6 +162,10 @@
134
162
  max-height: calc(100% - 120px);
135
163
  display: flex;
136
164
  flex-direction: column;
165
+
166
+ @{dark-selector} & {
167
+ background-color: lighten(@c-site-bg-dark, 6%);
168
+ }
137
169
  }
138
170
 
139
171
  .@{prefix}-search-bar-input {
@@ -165,6 +197,11 @@
165
197
  align-items: center;
166
198
  user-select: none;
167
199
 
200
+ @{dark-selector} & {
201
+ color: @c-text-note-dark;
202
+ border-top-color: @c-border-less-dark;
203
+ }
204
+
168
205
  > li {
169
206
  margin-inline-end: 10px;
170
207
  }
@@ -193,6 +230,12 @@
193
230
  border-bottom-width: 2px;
194
231
  transition: all 0.3s;
195
232
  pointer-events: none;
233
+
234
+ @{dark-selector} & {
235
+ color: @c-text-note-dark;
236
+ background-color: @c-site-bg-dark;
237
+ border-color: @c-border-dark;
238
+ }
196
239
  }
197
240
  }
198
241
  }
@@ -13,6 +13,11 @@
13
13
  color: @c-text-secondary;
14
14
  background-color: @c-border-light;
15
15
 
16
+ @{dark-selector} & {
17
+ color: @c-text-secondary-dark;
18
+ background-color: @c-border-less-dark;
19
+ }
20
+
16
21
  &:first-child {
17
22
  margin-top: -2px;
18
23
  }
@@ -28,6 +33,10 @@
28
33
 
29
34
  + dd {
30
35
  border-top: 1px dashed @c-border-light;
36
+
37
+ @{dark-selector} & {
38
+ border-top-color: @c-border-less-dark;
39
+ }
31
40
  }
32
41
 
33
42
  + dt {
@@ -52,13 +61,25 @@
52
61
  &:hover {
53
62
  background-color: @c-primary;
54
63
 
64
+ @{dark-selector} & {
65
+ background-color: darken(@c-primary-dark, 28%);
66
+ }
67
+
55
68
  > h4,
56
69
  > p {
57
70
  color: #fff;
71
+
72
+ @{dark-selector} & {
73
+ color: darken(#fff, 20%);
74
+ }
58
75
  }
59
76
 
60
77
  > svg {
61
78
  fill: #fff;
79
+
80
+ @{dark-selector} & {
81
+ fill: darken(#fff, 20%);
82
+ }
62
83
  }
63
84
  }
64
85
 
@@ -69,6 +90,10 @@
69
90
  width: 32px;
70
91
  height: 32px;
71
92
  fill: darken(@c-border, 5%);
93
+
94
+ @{dark-selector} & {
95
+ fill: lighten(@c-border-dark, 5%);
96
+ }
72
97
  }
73
98
 
74
99
  > h4,
@@ -83,6 +108,10 @@
83
108
  > h4 {
84
109
  color: @c-text-secondary;
85
110
  font-size: 14px;
111
+
112
+ @{dark-selector} & {
113
+ color: @c-text-secondary-dark;
114
+ }
86
115
  }
87
116
 
88
117
  > p {
@@ -90,6 +119,10 @@
90
119
  font-size: 13px;
91
120
  color: @c-text-note;
92
121
 
122
+ @{dark-selector} & {
123
+ color: @c-text-note-dark;
124
+ }
125
+
93
126
  &:empty {
94
127
  display: none;
95
128
  }
@@ -99,10 +132,15 @@
99
132
  }
100
133
 
101
134
  mark {
102
- color: rgb(72 70 7);
135
+ color: rgb(72, 70, 7);
103
136
  padding: 0 2px;
104
137
  border-radius: 2px;
105
- background-color: rgb(255 249 197);
138
+ background-color: rgb(255, 249, 197);
139
+
140
+ @{dark-selector} & {
141
+ color: rgb(147, 145, 71);
142
+ background-color: rgb(56, 37, 6);
143
+ }
106
144
  }
107
145
 
108
146
  .@{prefix}-search-empty {
@@ -113,10 +151,18 @@
113
151
  color: @c-text-note;
114
152
  font-size: 16px;
115
153
 
154
+ @{dark-selector} & {
155
+ color: @c-text-note-dark;
156
+ }
157
+
116
158
  > svg {
117
159
  margin-inline-end: 8px;
118
160
  width: 48px;
119
161
  fill: lighten(@c-text-note, 20%);
162
+
163
+ @{dark-selector} & {
164
+ fill: darken(@c-text-note-dark, 20%);
165
+ }
120
166
  }
121
167
  }
122
168
  }
@@ -25,6 +25,11 @@
25
25
  box-shadow: 0 0 20px rgba(0, 0, 0, 10%);
26
26
  transition: 0.2s all;
27
27
 
28
+ @{dark-selector} & {
29
+ background-color: @c-site-bg-dark;
30
+ border-top-color: @c-border-less-dark;
31
+ }
32
+
28
33
  .@{prefix}-doc-layout:not([data-mobile-sidebar-active]) & {
29
34
  opacity: 0;
30
35
  visibility: hidden;
@@ -46,6 +51,10 @@
46
51
  overflow: hidden;
47
52
  text-overflow: ellipsis;
48
53
  text-transform: uppercase;
54
+
55
+ @{dark-selector} & {
56
+ color: @c-text-dark;
57
+ }
49
58
  }
50
59
 
51
60
  > dd {
@@ -63,13 +72,25 @@
63
72
  overflow: hidden;
64
73
  text-overflow: ellipsis;
65
74
 
75
+ @{dark-selector} & {
76
+ color: @c-text-secondary-dark;
77
+ }
78
+
66
79
  &:hover {
67
80
  color: @c-primary;
81
+
82
+ @{dark-selector} & {
83
+ color: @c-primary-dark;
84
+ }
68
85
  }
69
86
 
70
87
  &.active {
71
88
  color: @c-primary;
72
89
  font-weight: 500;
90
+
91
+ @{dark-selector} & {
92
+ color: @c-primary-dark;
93
+ }
73
94
  }
74
95
  }
75
96
  }
@@ -79,6 +100,10 @@
79
100
  margin-top: 16px;
80
101
  padding-top: 16px;
81
102
  border-top: 1px solid @c-border;
103
+
104
+ @{dark-selector} & {
105
+ border-top-color: @c-border-dark;
106
+ }
82
107
  }
83
108
  }
84
109
  }