@vuepress/theme-default 2.0.0-rc.5 → 2.0.0-rc.52

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 (141) hide show
  1. package/lib/client/components/VPDarkIcon.vue +8 -0
  2. package/lib/client/components/VPDropdownTransition.vue +36 -0
  3. package/lib/client/components/VPEditIcon.vue +12 -0
  4. package/lib/client/components/VPHome.vue +38 -0
  5. package/lib/client/components/VPHomeFeatures.vue +66 -0
  6. package/lib/client/components/{HomeFooter.vue → VPHomeFooter.vue} +17 -2
  7. package/lib/client/components/{HomeHero.vue → VPHomeHero.vue} +113 -19
  8. package/lib/client/components/VPLightIcon.vue +28 -0
  9. package/lib/client/components/VPNavbar.vue +134 -0
  10. package/lib/client/components/{NavbarBrand.vue → VPNavbarBrand.vue} +40 -7
  11. package/lib/client/components/VPNavbarDropdown.vue +320 -0
  12. package/lib/client/components/VPNavbarItems.vue +111 -0
  13. package/lib/client/components/VPPage.vue +70 -0
  14. package/lib/client/components/VPPageMeta.vue +132 -0
  15. package/lib/client/components/VPPageNav.vue +118 -0
  16. package/lib/client/components/VPSidebar.vue +113 -0
  17. package/lib/client/components/VPSidebarItem.vue +174 -0
  18. package/lib/client/components/{SidebarItems.vue → VPSidebarItems.vue} +32 -7
  19. package/lib/client/components/VPToggleColorModeButton.vue +55 -0
  20. package/lib/client/components/VPToggleSidebarButton.vue +92 -0
  21. package/lib/client/components/global/Badge.vue +84 -18
  22. package/lib/client/components/global/index.d.ts +1 -3
  23. package/lib/client/components/global/index.js +1 -3
  24. package/lib/client/composables/index.d.ts +8 -0
  25. package/lib/client/composables/index.js +8 -0
  26. package/lib/client/composables/useContributors.d.ts +3 -0
  27. package/lib/client/composables/useContributors.js +14 -0
  28. package/lib/client/composables/useDarkMode.d.ts +0 -1
  29. package/lib/client/composables/useDarkMode.js +16 -13
  30. package/lib/client/composables/useEditLink.d.ts +3 -0
  31. package/lib/client/composables/useEditLink.js +31 -0
  32. package/lib/client/composables/useLastUpdated.d.ts +2 -0
  33. package/lib/client/composables/useLastUpdated.js +17 -0
  34. package/lib/client/composables/useNavbarConfig.d.ts +3 -0
  35. package/lib/client/composables/useNavbarConfig.js +27 -0
  36. package/lib/client/composables/useNavbarRepo.d.ts +6 -0
  37. package/lib/client/composables/useNavbarRepo.js +38 -0
  38. package/lib/client/composables/useNavbarSelectLanguage.d.ts +6 -0
  39. package/lib/client/composables/useNavbarSelectLanguage.js +59 -0
  40. package/lib/client/composables/useNavigate.d.ts +1 -0
  41. package/lib/client/composables/useNavigate.js +22 -0
  42. package/lib/client/composables/useRelatedLinks.d.ts +8 -0
  43. package/lib/client/composables/useRelatedLinks.js +91 -0
  44. package/lib/client/composables/useScrollPromise.js +3 -1
  45. package/lib/client/composables/useSidebarItems.d.ts +28 -23
  46. package/lib/client/composables/useSidebarItems.js +120 -84
  47. package/lib/client/composables/useUpdateDeviceStatus.d.ts +1 -1
  48. package/lib/client/composables/useUpdateDeviceStatus.js +10 -5
  49. package/lib/client/config.d.ts +3 -2
  50. package/lib/client/config.js +9 -22
  51. package/lib/client/index.d.ts +2 -1
  52. package/lib/client/index.js +0 -1
  53. package/lib/client/layouts/Layout.vue +139 -34
  54. package/lib/client/layouts/NotFound.vue +17 -5
  55. package/lib/client/shim.d.ts +12 -3
  56. package/lib/client/styles/_mixins.scss +4 -4
  57. package/lib/client/styles/_variables.module.scss +1 -1
  58. package/lib/client/styles/_variables.scss +1 -0
  59. package/lib/client/styles/arrow.scss +18 -24
  60. package/lib/client/styles/code-group.scss +35 -30
  61. package/lib/client/styles/content/code.scss +23 -0
  62. package/lib/client/styles/content/index.scss +3 -0
  63. package/lib/client/styles/content/normalize.scss +39 -0
  64. package/lib/client/styles/{toc.scss → content/toc.scss} +1 -1
  65. package/lib/client/styles/external-link-icon.scss +37 -0
  66. package/lib/client/styles/index.scss +3 -13
  67. package/lib/client/styles/layout.scss +3 -199
  68. package/lib/client/styles/normalize.scss +1 -194
  69. package/lib/client/styles/plugins.scss +28 -0
  70. package/lib/client/styles/vars-dark.scss +20 -58
  71. package/lib/client/styles/vars.scss +53 -129
  72. package/lib/client/typings.d.ts +13 -0
  73. package/lib/client/typings.js +1 -0
  74. package/lib/client/utils/getAutoLink.d.ts +9 -0
  75. package/lib/client/utils/getAutoLink.js +17 -0
  76. package/lib/client/utils/index.d.ts +3 -2
  77. package/lib/client/utils/index.js +3 -2
  78. package/lib/client/utils/isActiveSidebarItem.d.ts +3 -3
  79. package/lib/client/utils/isActiveSidebarItem.js +3 -3
  80. package/lib/client/utils/isLinkInternal.d.ts +1 -0
  81. package/lib/client/utils/isLinkInternal.js +2 -0
  82. package/lib/client/utils/resolveEditLink.d.ts +1 -1
  83. package/lib/client/utils/resolvePrefix.d.ts +1 -0
  84. package/lib/client/utils/resolvePrefix.js +4 -0
  85. package/lib/client/utils/resolveRepoType.d.ts +1 -1
  86. package/lib/client/utils/resolveRepoType.js +4 -4
  87. package/lib/node/defaultTheme.d.ts +2 -1
  88. package/lib/node/defaultTheme.js +72 -46
  89. package/lib/node/index.d.ts +3 -1
  90. package/lib/node/index.js +1 -1
  91. package/lib/node/typings.d.ts +58 -0
  92. package/lib/node/typings.js +1 -0
  93. package/lib/node/utils/assignDefaultLocaleOptions.js +3 -7
  94. package/lib/node/utils/index.d.ts +1 -1
  95. package/lib/node/utils/index.js +1 -1
  96. package/lib/node/utils/resolveMarkdownHintLocales.d.ts +9 -0
  97. package/lib/node/utils/resolveMarkdownHintLocales.js +19 -0
  98. package/lib/shared/index.d.ts +5 -3
  99. package/lib/shared/index.js +1 -3
  100. package/lib/shared/nav.d.ts +19 -30
  101. package/lib/shared/navbar.d.ts +21 -0
  102. package/lib/shared/navbar.js +1 -0
  103. package/lib/shared/options.d.ts +36 -60
  104. package/lib/shared/page.d.ts +9 -6
  105. package/lib/shared/sidebar.d.ts +26 -0
  106. package/lib/shared/sidebar.js +1 -0
  107. package/package.json +30 -26
  108. package/templates/build.html +23 -14
  109. package/lib/client/components/AutoLink.vue +0 -113
  110. package/lib/client/components/DropdownTransition.vue +0 -25
  111. package/lib/client/components/Home.vue +0 -15
  112. package/lib/client/components/HomeContent.vue +0 -5
  113. package/lib/client/components/HomeFeatures.vue +0 -22
  114. package/lib/client/components/Navbar.vue +0 -79
  115. package/lib/client/components/NavbarDropdown.vue +0 -126
  116. package/lib/client/components/NavbarItems.vue +0 -199
  117. package/lib/client/components/Page.vue +0 -31
  118. package/lib/client/components/PageMeta.vue +0 -124
  119. package/lib/client/components/PageNav.vue +0 -122
  120. package/lib/client/components/Sidebar.vue +0 -18
  121. package/lib/client/components/SidebarItem.vue +0 -87
  122. package/lib/client/components/ToggleColorModeButton.vue +0 -57
  123. package/lib/client/components/ToggleSidebarButton.vue +0 -24
  124. package/lib/client/components/global/CodeGroup.d.ts +0 -6
  125. package/lib/client/components/global/CodeGroup.js +0 -120
  126. package/lib/client/components/global/CodeGroupItem.vue +0 -27
  127. package/lib/client/styles/badge.scss +0 -36
  128. package/lib/client/styles/code.scss +0 -263
  129. package/lib/client/styles/custom-container.scss +0 -142
  130. package/lib/client/styles/home.scss +0 -168
  131. package/lib/client/styles/navbar-dropdown.scss +0 -183
  132. package/lib/client/styles/navbar.scss +0 -197
  133. package/lib/client/styles/page.scss +0 -87
  134. package/lib/client/styles/sidebar.scss +0 -134
  135. package/lib/client/styles/transitions.scss +0 -22
  136. package/lib/client/utils/getNavLink.d.ts +0 -15
  137. package/lib/client/utils/getNavLink.js +0 -18
  138. package/lib/client/utils/getResolveRouteWithRedirect.d.ts +0 -5
  139. package/lib/client/utils/getResolveRouteWithRedirect.js +0 -22
  140. package/lib/node/utils/resolveContainerPluginOptions.d.ts +0 -8
  141. package/lib/node/utils/resolveContainerPluginOptions.js +0 -17
@@ -1,120 +0,0 @@
1
- import { useStorage } from '@vueuse/core';
2
- import { computed, defineComponent, h, onBeforeUpdate, onMounted, ref, watch, } from 'vue';
3
- export const CodeGroup = defineComponent({
4
- name: 'CodeGroup',
5
- slots: Object,
6
- setup(_, { slots }) {
7
- // refs of the tab buttons
8
- const tabRefs = ref([]);
9
- if (__VUEPRESS_DEV__) {
10
- // in dev mode, we need to clear the tabs ref to avoid HMR issues
11
- // after removing a code-group-item
12
- onBeforeUpdate(() => {
13
- tabRefs.value = [];
14
- });
15
- }
16
- // index of current active item
17
- const activeIndex = ref(-1);
18
- const codeGroupStorage = useStorage('vuepress-code-group', {});
19
- const codeGroupKey = computed(() => tabRefs.value.map((tab) => tab.innerText).join(','));
20
- onMounted(() => {
21
- watch(() => codeGroupStorage.value[codeGroupKey.value], (val = -1) => {
22
- if (activeIndex.value !== val) {
23
- activeIndex.value = val;
24
- }
25
- }, { immediate: true });
26
- watch(activeIndex, (val) => {
27
- if (codeGroupStorage.value[codeGroupKey.value] !== val) {
28
- codeGroupStorage.value[codeGroupKey.value] = val;
29
- }
30
- });
31
- });
32
- // activate next tab
33
- const activateNext = (i = activeIndex.value) => {
34
- if (i < tabRefs.value.length - 1) {
35
- activeIndex.value = i + 1;
36
- }
37
- else {
38
- activeIndex.value = 0;
39
- }
40
- tabRefs.value[activeIndex.value].focus();
41
- };
42
- // activate previous tab
43
- const activatePrev = (i = activeIndex.value) => {
44
- if (i > 0) {
45
- activeIndex.value = i - 1;
46
- }
47
- else {
48
- activeIndex.value = tabRefs.value.length - 1;
49
- }
50
- tabRefs.value[activeIndex.value].focus();
51
- };
52
- // handle keyboard event
53
- const keyboardHandler = (event, i) => {
54
- if (event.key === ' ' || event.key === 'Enter') {
55
- event.preventDefault();
56
- activeIndex.value = i;
57
- }
58
- else if (event.key === 'ArrowRight') {
59
- event.preventDefault();
60
- activateNext(i);
61
- }
62
- else if (event.key === 'ArrowLeft') {
63
- event.preventDefault();
64
- activatePrev(i);
65
- }
66
- };
67
- return () => {
68
- // get children code-group-item from default slots
69
- const items = (slots.default?.() || [])
70
- .filter((vnode) => vnode.type.name === 'CodeGroupItem')
71
- .map((vnode) => {
72
- if (vnode.props === null) {
73
- vnode.props = {};
74
- }
75
- return vnode;
76
- });
77
- // do not render anything if there is no code-group-item
78
- if (items.length === 0) {
79
- return null;
80
- }
81
- // if activeIndex is invalid
82
- if (activeIndex.value < 0 || activeIndex.value > items.length - 1) {
83
- // find the index of the code-group-item with `active` props
84
- activeIndex.value = items.findIndex((vnode) => vnode.props.active === '' || vnode.props.active === true);
85
- // if there is no `active` props on code-group-item, set the first item active
86
- if (activeIndex.value === -1) {
87
- activeIndex.value = 0;
88
- }
89
- }
90
- // if activeIndex is valid
91
- else {
92
- // set the active item
93
- items.forEach((vnode, i) => {
94
- vnode.props.active = i === activeIndex.value;
95
- });
96
- }
97
- return h('div', { class: 'code-group' }, [
98
- h('div', { class: 'code-group__nav', role: 'tablist' }, items.map((vnode, i) => {
99
- const isActive = i === activeIndex.value;
100
- return h('button', {
101
- ref: (element) => {
102
- if (element) {
103
- tabRefs.value[i] = element;
104
- }
105
- },
106
- class: {
107
- 'code-group__nav-tab': true,
108
- 'code-group__nav-tab-active': isActive,
109
- },
110
- role: 'tab',
111
- ariaSelected: isActive,
112
- onClick: () => (activeIndex.value = i),
113
- onKeydown: (e) => keyboardHandler(e, i),
114
- }, vnode.props.title);
115
- })),
116
- items,
117
- ]);
118
- };
119
- },
120
- });
@@ -1,27 +0,0 @@
1
- <script setup lang="ts">
2
- defineOptions({
3
- name: 'CodeGroupItem',
4
- })
5
-
6
- defineProps({
7
- title: {
8
- type: String,
9
- required: true,
10
- },
11
- active: {
12
- type: Boolean,
13
- required: false,
14
- default: false,
15
- },
16
- })
17
- </script>
18
-
19
- <template>
20
- <div
21
- class="code-group-item"
22
- :class="{ 'code-group-item__active': active }"
23
- role="tabpanel"
24
- >
25
- <slot />
26
- </div>
27
- </template>
@@ -1,36 +0,0 @@
1
- .badge {
2
- display: inline-block;
3
- font-size: 14px;
4
- font-weight: 600;
5
- height: 18px;
6
- line-height: 18px;
7
- border-radius: 3px;
8
- padding: 0 6px;
9
- color: var(--c-bg);
10
- vertical-align: top;
11
- transition:
12
- color var(--t-color),
13
- background-color var(--t-color);
14
-
15
- &.tip {
16
- background-color: var(--c-badge-tip);
17
- }
18
-
19
- &.warning {
20
- background-color: var(--c-badge-warning);
21
- color: var(--c-badge-warning-text);
22
- }
23
-
24
- &.danger {
25
- background-color: var(--c-badge-danger);
26
- color: var(--c-badge-danger-text);
27
- }
28
-
29
- .table-of-contents & {
30
- vertical-align: middle;
31
- }
32
-
33
- & + & {
34
- margin-left: 5px;
35
- }
36
- }
@@ -1,263 +0,0 @@
1
- @import '_variables';
2
-
3
- // Safari only support integer pixel value for line-height
4
- // the original font-size is 16px, 1.375 will make line-height be 22px
5
- $line-height: 1.375;
6
-
7
- // ===============================
8
- // Forked and modified from prismjs/themes/prism-tomorrow.css
9
-
10
- code[class*='language-'],
11
- pre[class*='language-'] {
12
- color: #ccc;
13
- background: none;
14
- font-family: var(--font-family-code);
15
- font-size: 1em;
16
- text-align: left;
17
- white-space: pre;
18
- word-spacing: normal;
19
- word-break: normal;
20
- word-wrap: normal;
21
- line-height: 1.5;
22
-
23
- -moz-tab-size: 4;
24
- -o-tab-size: 4;
25
- tab-size: 4;
26
-
27
- -webkit-hyphens: none;
28
- -moz-hyphens: none;
29
- -ms-hyphens: none;
30
- hyphens: none;
31
- }
32
-
33
- /* Code blocks */
34
- pre[class*='language-'] {
35
- padding: 1em;
36
- margin: 0.5em 0;
37
- overflow: auto;
38
- }
39
-
40
- :not(pre) > code[class*='language-'],
41
- pre[class*='language-'] {
42
- background: #2d2d2d;
43
- }
44
-
45
- /* Inline code */
46
- :not(pre) > code[class*='language-'] {
47
- padding: 0.1em;
48
- border-radius: 0.3em;
49
- white-space: normal;
50
- }
51
-
52
- .token.comment,
53
- .token.block-comment,
54
- .token.prolog,
55
- .token.doctype,
56
- .token.cdata {
57
- color: #999;
58
- }
59
-
60
- .token.punctuation {
61
- color: #ccc;
62
- }
63
-
64
- .token.tag,
65
- .token.attr-name,
66
- .token.namespace,
67
- .token.deleted {
68
- color: #ec5975;
69
- }
70
-
71
- .token.function-name {
72
- color: #6196cc;
73
- }
74
-
75
- .token.boolean,
76
- .token.number,
77
- .token.function {
78
- color: #f08d49;
79
- }
80
-
81
- .token.property,
82
- .token.class-name,
83
- .token.constant,
84
- .token.symbol {
85
- color: #f8c555;
86
- }
87
-
88
- .token.selector,
89
- .token.important,
90
- .token.atrule,
91
- .token.keyword,
92
- .token.builtin {
93
- color: #cc99cd;
94
- }
95
-
96
- .token.string,
97
- .token.char,
98
- .token.attr-value,
99
- .token.regex,
100
- .token.variable {
101
- color: #7ec699;
102
- }
103
-
104
- .token.operator,
105
- .token.entity,
106
- .token.url {
107
- color: #67cdcc;
108
- }
109
-
110
- .token.important,
111
- .token.bold {
112
- font-weight: bold;
113
- }
114
- .token.italic {
115
- font-style: italic;
116
- }
117
-
118
- .token.entity {
119
- cursor: help;
120
- }
121
-
122
- .token.inserted {
123
- color: #3eaf7c;
124
- }
125
-
126
- // ===============================
127
-
128
- .theme-default-content {
129
- pre,
130
- pre[class*='language-'] {
131
- line-height: $line-height;
132
- padding: 1.3rem 1.5rem;
133
- margin: 0.85rem 0;
134
- border-radius: 6px;
135
- overflow: auto;
136
-
137
- code {
138
- color: #fff;
139
- padding: 0;
140
- background-color: transparent !important;
141
- border-radius: 0;
142
- overflow-wrap: unset;
143
- -webkit-font-smoothing: auto;
144
- -moz-osx-font-smoothing: auto;
145
- }
146
- }
147
-
148
- .line-number {
149
- font-family: var(--font-family-code);
150
- }
151
- }
152
-
153
- div[class*='language-'] {
154
- position: relative;
155
- background-color: var(--code-bg-color);
156
- border-radius: 6px;
157
-
158
- &::before {
159
- content: attr(data-title);
160
- position: absolute;
161
- z-index: 3;
162
- top: 0.8em;
163
- right: 1em;
164
- font-size: 0.75rem;
165
- color: var(--code-ln-color);
166
- }
167
-
168
- pre,
169
- pre[class*='language-'] {
170
- // force override the background color to be compatible with shiki
171
- background: transparent !important;
172
- position: relative;
173
- z-index: 1;
174
- }
175
-
176
- .highlight-lines {
177
- user-select: none;
178
- padding-top: 1.3rem;
179
- position: absolute;
180
- top: 0;
181
- left: 0;
182
- width: 100%;
183
- line-height: $line-height;
184
-
185
- .highlight-line {
186
- background-color: var(--code-hl-bg-color);
187
- }
188
- }
189
-
190
- &:not(.line-numbers-mode) {
191
- .line-numbers {
192
- display: none;
193
- }
194
- }
195
-
196
- &.line-numbers-mode {
197
- .highlight-lines .highlight-line {
198
- position: relative;
199
-
200
- &::before {
201
- content: ' ';
202
- position: absolute;
203
- z-index: 2;
204
- left: 0;
205
- top: 0;
206
- display: block;
207
- width: var(--code-ln-wrapper-width);
208
- height: 100%;
209
- }
210
- }
211
-
212
- pre {
213
- margin-left: var(--code-ln-wrapper-width);
214
- padding-left: 1rem;
215
- vertical-align: middle;
216
- }
217
-
218
- .line-numbers {
219
- position: absolute;
220
- top: 0;
221
- width: var(--code-ln-wrapper-width);
222
- text-align: center;
223
- color: var(--code-ln-color);
224
- padding-top: 1.25rem;
225
- line-height: $line-height;
226
- counter-reset: line-number;
227
-
228
- .line-number {
229
- position: relative;
230
- z-index: 3;
231
- user-select: none;
232
- height: #{$line-height}em;
233
-
234
- &::before {
235
- counter-increment: line-number;
236
- content: counter(line-number);
237
- font-size: 0.85em;
238
- }
239
- }
240
- }
241
-
242
- &::after {
243
- content: '';
244
- position: absolute;
245
- top: 0;
246
- left: 0;
247
- width: var(--code-ln-wrapper-width);
248
- height: 100%;
249
- border-radius: 6px 0 0 6px;
250
- border-right: 1px solid var(--code-hl-bg-color);
251
- }
252
- }
253
- }
254
-
255
- // narrow mobile
256
- @media (max-width: $MQMobileNarrow) {
257
- .theme-default-content {
258
- div[class*='language-'] {
259
- margin: 0.85rem -1.5rem;
260
- border-radius: 0;
261
- }
262
- }
263
- }
@@ -1,142 +0,0 @@
1
- .custom-container {
2
- transition:
3
- color var(--t-color),
4
- border-color var(--t-color),
5
- background-color var(--t-color);
6
-
7
- .custom-container-title {
8
- font-weight: 600;
9
- &:not(:only-child) {
10
- margin-bottom: -0.4rem;
11
- }
12
- }
13
-
14
- &.tip,
15
- &.warning,
16
- &.danger {
17
- padding: 0.1rem 1.5rem;
18
- border-left-width: 0.5rem;
19
- border-left-style: solid;
20
- margin: 1rem 0;
21
- }
22
-
23
- &.tip {
24
- border-color: var(--c-tip);
25
- background-color: var(--c-tip-bg);
26
- color: var(--c-tip-text);
27
-
28
- .custom-container-title {
29
- color: var(--c-tip-title);
30
- }
31
-
32
- a {
33
- color: var(--c-tip-text-accent);
34
- }
35
-
36
- code {
37
- background-color: var(--c-bg-dark);
38
- }
39
- }
40
-
41
- &.warning {
42
- border-color: var(--c-warning);
43
- background-color: var(--c-warning-bg);
44
- color: var(--c-warning-text);
45
-
46
- .custom-container-title {
47
- color: var(--c-warning-title);
48
- }
49
-
50
- a {
51
- color: var(--c-warning-text-accent);
52
- }
53
-
54
- blockquote {
55
- border-left-color: var(--c-warning-border-dark);
56
- color: var(--c-warning-text-quote);
57
- }
58
-
59
- code {
60
- color: var(--c-warning-text-light);
61
- background-color: var(--c-warning-bg-light);
62
- }
63
-
64
- details {
65
- background-color: var(--c-warning-details-bg);
66
-
67
- code {
68
- background-color: var(--c-warning-bg-lighter);
69
- }
70
- }
71
-
72
- .external-link-icon {
73
- --external-link-icon-color: var(--c-warning-text-quote);
74
- }
75
- }
76
-
77
- &.danger {
78
- border-color: var(--c-danger);
79
- background-color: var(--c-danger-bg);
80
- color: var(--c-danger-text);
81
-
82
- .custom-container-title {
83
- color: var(--c-danger-title);
84
- }
85
-
86
- a {
87
- color: var(--c-danger-text-accent);
88
- }
89
-
90
- blockquote {
91
- border-left-color: var(--c-danger-border-dark);
92
- color: var(--c-danger-text-quote);
93
- }
94
-
95
- code {
96
- color: var(--c-danger-text-light);
97
- background-color: var(--c-danger-bg-light);
98
- }
99
-
100
- details {
101
- background-color: var(--c-danger-details-bg);
102
-
103
- code {
104
- background-color: var(--c-danger-bg-lighter);
105
- }
106
- }
107
-
108
- .external-link-icon {
109
- --external-link-icon-color: var(--c-danger-text-quote);
110
- }
111
- }
112
-
113
- &.details {
114
- display: block;
115
- position: relative;
116
- border-radius: 2px;
117
- margin: 1.6em 0;
118
- padding: 1.6em;
119
- background-color: var(--c-details-bg);
120
-
121
- code {
122
- background-color: var(--c-bg-darker);
123
- }
124
-
125
- h4 {
126
- margin-top: 0;
127
- }
128
-
129
- figure,
130
- p {
131
- &:last-child {
132
- margin-bottom: 0;
133
- padding-bottom: 0;
134
- }
135
- }
136
-
137
- summary {
138
- outline: none;
139
- cursor: pointer;
140
- }
141
- }
142
- }