@vuepress/theme-default 2.0.0-beta.50-pre → 2.0.0-beta.50-pre.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 (93) hide show
  1. package/lib/client/components/AutoLink.vue +114 -0
  2. package/lib/client/components/DropdownTransition.vue +21 -0
  3. package/lib/client/components/Home.vue +15 -0
  4. package/lib/client/components/HomeContent.vue +5 -0
  5. package/lib/client/components/HomeFeatures.vue +23 -0
  6. package/lib/client/components/HomeFooter.vue +17 -0
  7. package/lib/client/components/HomeHero.vue +97 -0
  8. package/lib/client/components/Navbar.vue +75 -0
  9. package/lib/client/components/NavbarBrand.vue +55 -0
  10. package/lib/client/components/NavbarDropdown.vue +126 -0
  11. package/lib/client/components/NavbarItems.vue +163 -0
  12. package/lib/client/components/Page.vue +24 -0
  13. package/lib/client/components/PageMeta.vue +124 -0
  14. package/lib/client/components/PageNav.vue +103 -0
  15. package/lib/client/components/Sidebar.vue +13 -0
  16. package/lib/client/components/SidebarItem.vue +87 -0
  17. package/lib/client/components/SidebarItems.vue +57 -0
  18. package/lib/client/components/ToggleColorModeButton.vue +57 -0
  19. package/lib/client/components/ToggleSidebarButton.vue +24 -0
  20. package/lib/client/components/global/Badge.vue +31 -0
  21. package/lib/client/components/global/CodeGroup.d.ts +4 -0
  22. package/lib/client/components/global/CodeGroup.js +106 -0
  23. package/lib/client/components/global/CodeGroupItem.vue +31 -0
  24. package/lib/client/components/global/index.d.ts +4 -0
  25. package/lib/client/components/global/index.js +4 -0
  26. package/lib/client/composables/index.d.ts +6 -0
  27. package/lib/client/composables/index.js +6 -0
  28. package/lib/client/composables/useDarkMode.d.ts +12 -0
  29. package/lib/client/composables/useDarkMode.js +57 -0
  30. package/lib/client/composables/useNavLink.d.ts +14 -0
  31. package/lib/client/composables/useNavLink.js +18 -0
  32. package/lib/client/composables/useResolveRouteWithRedirect.d.ts +5 -0
  33. package/lib/client/composables/useResolveRouteWithRedirect.js +24 -0
  34. package/lib/client/composables/useScrollPromise.d.ts +6 -0
  35. package/lib/client/composables/useScrollPromise.js +14 -0
  36. package/lib/client/composables/useSidebarItems.d.ts +36 -0
  37. package/lib/client/composables/useSidebarItems.js +118 -0
  38. package/lib/client/composables/useThemeData.d.ts +4 -0
  39. package/lib/client/composables/useThemeData.js +3 -0
  40. package/lib/client/config.d.ts +3 -0
  41. package/lib/client/config.js +38 -0
  42. package/lib/client/index.d.ts +3 -0
  43. package/lib/client/index.js +3 -0
  44. package/lib/client/layouts/404.vue +27 -0
  45. package/lib/client/layouts/Layout.vue +134 -0
  46. package/lib/client/shim.d.ts +5 -0
  47. package/lib/client/styles/_mixins.scss +20 -0
  48. package/lib/client/styles/_variables.scss +11 -0
  49. package/lib/client/styles/arrow.scss +37 -0
  50. package/lib/client/styles/badge.scss +31 -0
  51. package/lib/client/styles/code-group.scss +69 -0
  52. package/lib/client/styles/code.scss +266 -0
  53. package/lib/client/styles/custom-container.scss +88 -0
  54. package/lib/client/styles/home.scss +168 -0
  55. package/lib/client/styles/index.scss +19 -0
  56. package/lib/client/styles/layout.scss +198 -0
  57. package/lib/client/styles/navbar-dropdown.scss +187 -0
  58. package/lib/client/styles/navbar.scss +177 -0
  59. package/lib/client/styles/normalize.scss +177 -0
  60. package/lib/client/styles/page.scss +83 -0
  61. package/lib/client/styles/sidebar.scss +134 -0
  62. package/lib/client/styles/toc.scss +5 -0
  63. package/lib/client/styles/transitions.scss +22 -0
  64. package/lib/client/styles/vars-dark.scss +46 -0
  65. package/lib/client/styles/vars.scss +133 -0
  66. package/lib/client/utils/index.d.ts +3 -0
  67. package/lib/client/utils/index.js +3 -0
  68. package/lib/client/utils/isActiveSidebarItem.d.ts +3 -0
  69. package/lib/client/utils/isActiveSidebarItem.js +20 -0
  70. package/lib/client/utils/resolveEditLink.d.ts +9 -0
  71. package/lib/client/utils/resolveEditLink.js +29 -0
  72. package/lib/client/utils/resolveRepoType.d.ts +2 -0
  73. package/lib/client/utils/resolveRepoType.js +12 -0
  74. package/lib/node/defaultTheme.d.ts +10 -0
  75. package/lib/node/defaultTheme.js +116 -0
  76. package/lib/node/index.d.ts +5 -0
  77. package/lib/node/index.js +5 -0
  78. package/lib/node/utils/assignDefaultLocaleOptions.d.ts +7 -0
  79. package/lib/node/utils/assignDefaultLocaleOptions.js +56 -0
  80. package/lib/node/utils/index.d.ts +2 -0
  81. package/lib/node/utils/index.js +2 -0
  82. package/lib/node/utils/resolveContainerPluginOptions.d.ts +8 -0
  83. package/lib/node/utils/resolveContainerPluginOptions.js +17 -0
  84. package/lib/shared/index.d.ts +3 -0
  85. package/lib/shared/index.js +3 -0
  86. package/lib/shared/nav.d.ts +43 -0
  87. package/lib/shared/nav.js +1 -0
  88. package/lib/shared/options.d.ts +243 -0
  89. package/lib/shared/options.js +1 -0
  90. package/lib/shared/page.d.ts +40 -0
  91. package/lib/shared/page.js +1 -0
  92. package/package.json +17 -17
  93. package/templates/build.html +33 -0
@@ -0,0 +1,134 @@
1
+ <script setup lang="ts">
2
+ import Home from '@theme/Home.vue'
3
+ import Navbar from '@theme/Navbar.vue'
4
+ import Page from '@theme/Page.vue'
5
+ import Sidebar from '@theme/Sidebar.vue'
6
+ import { usePageData, usePageFrontmatter } from '@vuepress/client'
7
+ import { computed, onMounted, onUnmounted, ref } from 'vue'
8
+ import { useRouter } from 'vue-router'
9
+ import type { DefaultThemePageFrontmatter } from '../../shared/index.js'
10
+ import {
11
+ useScrollPromise,
12
+ useSidebarItems,
13
+ useThemeLocaleData,
14
+ } from '../composables/index.js'
15
+
16
+ const page = usePageData()
17
+ const frontmatter = usePageFrontmatter<DefaultThemePageFrontmatter>()
18
+ const themeLocale = useThemeLocaleData()
19
+
20
+ // navbar
21
+ const shouldShowNavbar = computed(
22
+ () => frontmatter.value.navbar !== false && themeLocale.value.navbar !== false
23
+ )
24
+
25
+ // sidebar
26
+ const sidebarItems = useSidebarItems()
27
+ const isSidebarOpen = ref(false)
28
+ const toggleSidebar = (to?: boolean): void => {
29
+ isSidebarOpen.value = typeof to === 'boolean' ? to : !isSidebarOpen.value
30
+ }
31
+ const touchStart = { x: 0, y: 0 }
32
+ const onTouchStart = (e): void => {
33
+ touchStart.x = e.changedTouches[0].clientX
34
+ touchStart.y = e.changedTouches[0].clientY
35
+ }
36
+ const onTouchEnd = (e): void => {
37
+ const dx = e.changedTouches[0].clientX - touchStart.x
38
+ const dy = e.changedTouches[0].clientY - touchStart.y
39
+ if (Math.abs(dx) > Math.abs(dy) && Math.abs(dx) > 40) {
40
+ if (dx > 0 && touchStart.x <= 80) {
41
+ toggleSidebar(true)
42
+ } else {
43
+ toggleSidebar(false)
44
+ }
45
+ }
46
+ }
47
+
48
+ // classes
49
+ const containerClass = computed(() => [
50
+ {
51
+ 'no-navbar': !shouldShowNavbar.value,
52
+ 'no-sidebar': !sidebarItems.value.length,
53
+ 'sidebar-open': isSidebarOpen.value,
54
+ },
55
+ frontmatter.value.pageClass,
56
+ ])
57
+
58
+ // close sidebar after navigation
59
+ let unregisterRouterHook
60
+ onMounted(() => {
61
+ const router = useRouter()
62
+ unregisterRouterHook = router.afterEach(() => {
63
+ toggleSidebar(false)
64
+ })
65
+ })
66
+ onUnmounted(() => {
67
+ unregisterRouterHook()
68
+ })
69
+
70
+ // handle scrollBehavior with transition
71
+ const scrollPromise = useScrollPromise()
72
+ const onBeforeEnter = scrollPromise.resolve
73
+ const onBeforeLeave = scrollPromise.pending
74
+ </script>
75
+
76
+ <template>
77
+ <div
78
+ class="theme-container"
79
+ :class="containerClass"
80
+ @touchstart="onTouchStart"
81
+ @touchend="onTouchEnd"
82
+ >
83
+ <slot name="navbar">
84
+ <Navbar v-if="shouldShowNavbar" @toggle-sidebar="toggleSidebar">
85
+ <template #before>
86
+ <slot name="navbar-before" />
87
+ </template>
88
+ <template #after>
89
+ <slot name="navbar-after" />
90
+ </template>
91
+ </Navbar>
92
+ </slot>
93
+
94
+ <div class="sidebar-mask" @click="toggleSidebar(false)" />
95
+
96
+ <slot name="sidebar">
97
+ <Sidebar>
98
+ <template #top>
99
+ <slot name="sidebar-top" />
100
+ </template>
101
+ <template #bottom>
102
+ <slot name="sidebar-bottom" />
103
+ </template>
104
+ </Sidebar>
105
+ </slot>
106
+
107
+ <slot name="page">
108
+ <Home v-if="frontmatter.home" />
109
+
110
+ <Transition
111
+ v-else
112
+ name="fade-slide-y"
113
+ mode="out-in"
114
+ @before-enter="onBeforeEnter"
115
+ @before-leave="onBeforeLeave"
116
+ >
117
+ <Page :key="page.path">
118
+ <template #top>
119
+ <slot name="page-top" />
120
+ </template>
121
+ <template #content-top>
122
+ <slot name="page-content-top" />
123
+ </template>
124
+ <template #content-bottom>
125
+ <slot name="page-content-bottom" />
126
+ </template>
127
+ <template #bottom>
128
+ <slot name="page-bottom" />
129
+ </template>
130
+ </Page>
131
+ </Transition>
132
+ </slot>
133
+ </div>
134
+ </template>
@@ -0,0 +1,5 @@
1
+ declare module '*.vue' {
2
+ import type { ComponentOptions } from 'vue'
3
+ const comp: ComponentOptions
4
+ export default comp
5
+ }
@@ -0,0 +1,20 @@
1
+ @import '_variables';
2
+
3
+ @mixin content_wrapper {
4
+ max-width: var(--content-width);
5
+ margin: 0 auto;
6
+ padding: 2rem 2.5rem;
7
+
8
+ @media (max-width: $MQNarrow) {
9
+ padding: 2rem;
10
+ }
11
+
12
+ @media (max-width: $MQMobileNarrow) {
13
+ padding: 1.5rem;
14
+ }
15
+ }
16
+
17
+ @mixin dropdown_wrapper {
18
+ transition: height 0.1s ease-out;
19
+ overflow: hidden;
20
+ }
@@ -0,0 +1,11 @@
1
+ @import '@vuepress/plugin-palette/palette';
2
+
3
+ // responsive breakpoints
4
+ $MQNarrow: 959px !default;
5
+ $MQMobile: 719px !default;
6
+ $MQMobileNarrow: 419px !default;
7
+
8
+ // code languages
9
+ $codeLang: 'c' 'cpp' 'cs' 'css' 'dart' 'docker' 'fs' 'go' 'html' 'java' 'js'
10
+ 'json' 'kt' 'less' 'makefile' 'md' 'php' 'py' 'rb' 'rs' 'sass' 'scss' 'sh'
11
+ 'styl' 'ts' 'toml' 'vue' 'yml' !default;
@@ -0,0 +1,37 @@
1
+ .arrow {
2
+ display: inline-block;
3
+ width: 0;
4
+ height: 0;
5
+
6
+ &.up {
7
+ border: {
8
+ left: 4px solid transparent;
9
+ right: 4px solid transparent;
10
+ bottom: 6px solid var(--c-bg-arrow);
11
+ }
12
+ }
13
+
14
+ &.down {
15
+ border: {
16
+ left: 4px solid transparent;
17
+ right: 4px solid transparent;
18
+ top: 6px solid var(--c-bg-arrow);
19
+ }
20
+ }
21
+
22
+ &.right {
23
+ border: {
24
+ top: 4px solid transparent;
25
+ bottom: 4px solid transparent;
26
+ left: 6px solid var(--c-bg-arrow);
27
+ }
28
+ }
29
+
30
+ &.left {
31
+ border: {
32
+ top: 4px solid transparent;
33
+ bottom: 4px solid transparent;
34
+ right: 6px solid var(--c-bg-arrow);
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,31 @@
1
+ .badge {
2
+ display: inline-block;
3
+ font-size: 14px;
4
+ height: 18px;
5
+ line-height: 18px;
6
+ border-radius: 3px;
7
+ padding: 0 6px;
8
+ color: var(--c-bg);
9
+ vertical-align: top;
10
+ transition: color var(--t-color), background-color var(--t-color);
11
+
12
+ &.tip {
13
+ background-color: var(--c-badge-tip);
14
+ }
15
+
16
+ &.warning {
17
+ background-color: var(--c-badge-warning);
18
+ }
19
+
20
+ &.danger {
21
+ background-color: var(--c-badge-danger);
22
+ }
23
+
24
+ .table-of-contents & {
25
+ vertical-align: middle;
26
+ }
27
+
28
+ & + & {
29
+ margin-left: 5px;
30
+ }
31
+ }
@@ -0,0 +1,69 @@
1
+ @import '_variables';
2
+
3
+ /**
4
+ * code-group
5
+ */
6
+ .code-group__nav {
7
+ margin-top: 0.85rem;
8
+ // 2 * margin + border-radius of <pre> tag
9
+ margin-bottom: calc(-1.7rem - 6px);
10
+ padding-bottom: calc(1.7rem - 6px);
11
+ padding-left: 10px;
12
+ padding-top: 10px;
13
+ border-top-left-radius: 6px;
14
+ border-top-right-radius: 6px;
15
+ background-color: var(--code-bg-color);
16
+ }
17
+
18
+ .code-group__ul {
19
+ margin: auto 0;
20
+ padding-left: 0;
21
+ display: inline-flex;
22
+ list-style: none;
23
+ }
24
+
25
+ .code-group__nav-tab {
26
+ border: 0;
27
+ padding: 5px;
28
+ cursor: pointer;
29
+ background-color: transparent;
30
+ font-size: 0.85em;
31
+ line-height: 1.4;
32
+ color: rgba(255, 255, 255, 0.9);
33
+ font-weight: 600;
34
+ }
35
+
36
+ .code-group__nav-tab:focus {
37
+ outline: none;
38
+ }
39
+
40
+ .code-group__nav-tab:focus-visible {
41
+ outline: 1px solid rgba(255, 255, 255, 0.9);
42
+ }
43
+
44
+ .code-group__nav-tab-active {
45
+ border-bottom: var(--c-brand) 1px solid;
46
+ }
47
+
48
+ @media (max-width: $MQMobileNarrow) {
49
+ .code-group__nav {
50
+ margin-left: -1.5rem;
51
+ margin-right: -1.5rem;
52
+ border-radius: 0;
53
+ }
54
+ }
55
+
56
+ /**
57
+ * code-group-item
58
+ */
59
+ .code-group-item {
60
+ display: none;
61
+ }
62
+
63
+ .code-group-item__active {
64
+ display: block;
65
+ }
66
+
67
+ .code-group-item > pre {
68
+ background-color: orange;
69
+ }
@@ -0,0 +1,266 @@
1
+ @import '_variables';
2
+
3
+ // ===============================
4
+ // Forked and modified from prismjs/themes/prism-tomorrow.css
5
+
6
+ code[class*='language-'],
7
+ pre[class*='language-'] {
8
+ color: #ccc;
9
+ background: none;
10
+ font-family: var(--font-family-code);
11
+ font-size: 1em;
12
+ text-align: left;
13
+ white-space: pre;
14
+ word-spacing: normal;
15
+ word-break: normal;
16
+ word-wrap: normal;
17
+ line-height: 1.5;
18
+
19
+ -moz-tab-size: 4;
20
+ -o-tab-size: 4;
21
+ tab-size: 4;
22
+
23
+ -webkit-hyphens: none;
24
+ -moz-hyphens: none;
25
+ -ms-hyphens: none;
26
+ hyphens: none;
27
+ }
28
+
29
+ /* Code blocks */
30
+ pre[class*='language-'] {
31
+ padding: 1em;
32
+ margin: 0.5em 0;
33
+ overflow: auto;
34
+ }
35
+
36
+ :not(pre) > code[class*='language-'],
37
+ pre[class*='language-'] {
38
+ background: #2d2d2d;
39
+ }
40
+
41
+ /* Inline code */
42
+ :not(pre) > code[class*='language-'] {
43
+ padding: 0.1em;
44
+ border-radius: 0.3em;
45
+ white-space: normal;
46
+ }
47
+
48
+ .token.comment,
49
+ .token.block-comment,
50
+ .token.prolog,
51
+ .token.doctype,
52
+ .token.cdata {
53
+ color: #999;
54
+ }
55
+
56
+ .token.punctuation {
57
+ color: #ccc;
58
+ }
59
+
60
+ .token.tag,
61
+ .token.attr-name,
62
+ .token.namespace,
63
+ .token.deleted {
64
+ color: #ec5975;
65
+ }
66
+
67
+ .token.function-name {
68
+ color: #6196cc;
69
+ }
70
+
71
+ .token.boolean,
72
+ .token.number,
73
+ .token.function {
74
+ color: #f08d49;
75
+ }
76
+
77
+ .token.property,
78
+ .token.class-name,
79
+ .token.constant,
80
+ .token.symbol {
81
+ color: #f8c555;
82
+ }
83
+
84
+ .token.selector,
85
+ .token.important,
86
+ .token.atrule,
87
+ .token.keyword,
88
+ .token.builtin {
89
+ color: #cc99cd;
90
+ }
91
+
92
+ .token.string,
93
+ .token.char,
94
+ .token.attr-value,
95
+ .token.regex,
96
+ .token.variable {
97
+ color: #7ec699;
98
+ }
99
+
100
+ .token.operator,
101
+ .token.entity,
102
+ .token.url {
103
+ color: #67cdcc;
104
+ }
105
+
106
+ .token.important,
107
+ .token.bold {
108
+ font-weight: bold;
109
+ }
110
+ .token.italic {
111
+ font-style: italic;
112
+ }
113
+
114
+ .token.entity {
115
+ cursor: help;
116
+ }
117
+
118
+ .token.inserted {
119
+ color: #3eaf7c;
120
+ }
121
+
122
+ // ===============================
123
+
124
+ .theme-default-content {
125
+ pre,
126
+ pre[class*='language-'] {
127
+ line-height: 1.4;
128
+ padding: 1.3rem 1.5rem;
129
+ margin: 0.85rem 0;
130
+ border-radius: 6px;
131
+ overflow: auto;
132
+
133
+ code {
134
+ color: #fff;
135
+ padding: 0;
136
+ background-color: transparent;
137
+ border-radius: 0;
138
+ overflow-wrap: unset;
139
+ -webkit-font-smoothing: auto;
140
+ -moz-osx-font-smoothing: auto;
141
+ }
142
+ }
143
+
144
+ .line-number {
145
+ font-family: var(--font-family-code);
146
+ }
147
+ }
148
+
149
+ div[class*='language-'] {
150
+ position: relative;
151
+ background-color: var(--code-bg-color);
152
+ border-radius: 6px;
153
+
154
+ &::before {
155
+ position: absolute;
156
+ z-index: 3;
157
+ top: 0.8em;
158
+ right: 1em;
159
+ font-size: 0.75rem;
160
+ color: var(--code-ln-color);
161
+ }
162
+
163
+ pre,
164
+ pre[class*='language-'] {
165
+ // force override the background color to be compatible with shiki
166
+ background: transparent !important;
167
+ position: relative;
168
+ z-index: 1;
169
+ }
170
+
171
+ .highlight-lines {
172
+ user-select: none;
173
+ padding-top: 1.3rem;
174
+ position: absolute;
175
+ top: 0;
176
+ left: 0;
177
+ width: 100%;
178
+ line-height: 1.4;
179
+
180
+ .highlight-line {
181
+ background-color: var(--code-hl-bg-color);
182
+ }
183
+ }
184
+
185
+ &:not(.line-numbers-mode) {
186
+ .line-numbers {
187
+ display: none;
188
+ }
189
+ }
190
+
191
+ &.line-numbers-mode {
192
+ .highlight-lines .highlight-line {
193
+ position: relative;
194
+
195
+ &::before {
196
+ content: ' ';
197
+ position: absolute;
198
+ z-index: 2;
199
+ left: 0;
200
+ top: 0;
201
+ display: block;
202
+ width: var(--code-ln-wrapper-width);
203
+ height: 100%;
204
+ }
205
+ }
206
+
207
+ pre {
208
+ margin-left: var(--code-ln-wrapper-width);
209
+ padding-left: 1rem;
210
+ vertical-align: middle;
211
+ }
212
+
213
+ .line-numbers {
214
+ position: absolute;
215
+ top: 0;
216
+ width: var(--code-ln-wrapper-width);
217
+ text-align: center;
218
+ color: var(--code-ln-color);
219
+ padding-top: 1.25rem;
220
+ line-height: 1.4;
221
+ counter-reset: line-number;
222
+
223
+ .line-number {
224
+ position: relative;
225
+ z-index: 3;
226
+ user-select: none;
227
+ height: 1.4em;
228
+
229
+ &::before {
230
+ counter-increment: line-number;
231
+ content: counter(line-number);
232
+ font-size: 0.85em;
233
+ }
234
+ }
235
+ }
236
+
237
+ &::after {
238
+ content: '';
239
+ position: absolute;
240
+ top: 0;
241
+ left: 0;
242
+ width: var(--code-ln-wrapper-width);
243
+ height: 100%;
244
+ border-radius: 6px 0 0 6px;
245
+ border-right: 1px solid var(--code-hl-bg-color);
246
+ }
247
+ }
248
+ }
249
+
250
+ @each $lang in $codeLang {
251
+ div[class*='language-'].ext-#{$lang} {
252
+ &:before {
253
+ content: '' + $lang;
254
+ }
255
+ }
256
+ }
257
+
258
+ // narrow mobile
259
+ @media (max-width: $MQMobileNarrow) {
260
+ .theme-default-content {
261
+ div[class*='language-'] {
262
+ margin: 0.85rem -1.5rem;
263
+ border-radius: 0;
264
+ }
265
+ }
266
+ }
@@ -0,0 +1,88 @@
1
+ .custom-container {
2
+ transition: color var(--t-color), border-color var(--t-color),
3
+ background-color var(--t-color);
4
+
5
+ .custom-container-title {
6
+ font-weight: 600;
7
+ &:not(:only-child) {
8
+ margin-bottom: -0.4rem;
9
+ }
10
+ }
11
+
12
+ &.tip,
13
+ &.warning,
14
+ &.danger {
15
+ padding: 0.1rem 1.5rem;
16
+ border-left-width: 0.5rem;
17
+ border-left-style: solid;
18
+ margin: 1rem 0;
19
+ }
20
+
21
+ &.tip {
22
+ border-color: var(--c-tip);
23
+ background-color: var(--c-tip-bg);
24
+ color: var(--c-tip-text);
25
+
26
+ .custom-container-title {
27
+ color: var(--c-tip-title);
28
+ }
29
+
30
+ a {
31
+ color: var(--c-tip-text-accent);
32
+ }
33
+ }
34
+
35
+ &.warning {
36
+ border-color: var(--c-warning);
37
+ background-color: var(--c-warning-bg);
38
+ color: var(--c-warning-text);
39
+
40
+ .custom-container-title {
41
+ color: var(--c-warning-title);
42
+ }
43
+
44
+ a {
45
+ color: var(--c-warning-text-accent);
46
+ }
47
+ }
48
+
49
+ &.danger {
50
+ border-color: var(--c-danger);
51
+ background-color: var(--c-danger-bg);
52
+ color: var(--c-danger-text);
53
+
54
+ .custom-container-title {
55
+ color: var(--c-danger-title);
56
+ }
57
+
58
+ a {
59
+ color: var(--c-danger-text-accent);
60
+ }
61
+ }
62
+
63
+ &.details {
64
+ display: block;
65
+ position: relative;
66
+ border-radius: 2px;
67
+ margin: 1.6em 0;
68
+ padding: 1.6em;
69
+ background-color: var(--c-details-bg);
70
+
71
+ h4 {
72
+ margin-top: 0;
73
+ }
74
+
75
+ figure,
76
+ p {
77
+ &:last-child {
78
+ margin-bottom: 0;
79
+ padding-bottom: 0;
80
+ }
81
+ }
82
+
83
+ summary {
84
+ outline: none;
85
+ cursor: pointer;
86
+ }
87
+ }
88
+ }