@frontfactory/vitepress-theme 1.0.0
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/LICENSE.md +21 -0
- package/README.md +260 -0
- package/config.d.ts +6 -0
- package/config.js +54 -0
- package/dist/style.css +1709 -0
- package/package.json +84 -0
- package/src/components/FfBackToTop.vue +50 -0
- package/src/components/FfBanner.vue +74 -0
- package/src/components/FfDocMeta.vue +112 -0
- package/src/components/FfFeature.vue +44 -0
- package/src/components/FfFooter.vue +40 -0
- package/src/components/FfHero.vue +171 -0
- package/src/composables/options.ts +48 -0
- package/src/content/Api.vue +32 -0
- package/src/content/Card.vue +31 -0
- package/src/content/CardGrid.vue +9 -0
- package/src/content/Kbd.vue +3 -0
- package/src/content/Steps.vue +5 -0
- package/src/index.ts +52 -0
- package/src/internal.ts +10 -0
- package/src/layout/FfLayout.vue +41 -0
- package/src/styles/_base.scss +121 -0
- package/src/styles/_blocks.scss +103 -0
- package/src/styles/_code.scss +163 -0
- package/src/styles/_content.scss +374 -0
- package/src/styles/_doc.scss +416 -0
- package/src/styles/_home.scss +429 -0
- package/src/styles/_motion.scss +231 -0
- package/src/styles/_nav.scss +224 -0
- package/src/styles/_sidebar.scss +127 -0
- package/src/styles/_theme.scss +8 -0
- package/src/styles/_tokens.scss +235 -0
- package/src/styles/index.scss +19 -0
- package/src/types.ts +96 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// ============================================================================================= //
|
|
2
|
+
// NAVIGATION //
|
|
3
|
+
// ============================================================================================= //
|
|
4
|
+
|
|
5
|
+
@use "theme" as mg;
|
|
6
|
+
|
|
7
|
+
.ff-theme {
|
|
8
|
+
// ----------------------------------------------------------------------------------------- //
|
|
9
|
+
// Top bar
|
|
10
|
+
// ----------------------------------------------------------------------------------------- //
|
|
11
|
+
|
|
12
|
+
// The surface is painted by ::before from --vp-nav-bg-color, set in _tokens.scss. Only the rule
|
|
13
|
+
// is ours: the default one is an element inset by --vp-nav-col-offset, and this theme runs it
|
|
14
|
+
// edge to edge — a distance no variable expresses.
|
|
15
|
+
|
|
16
|
+
.VPNavBar {
|
|
17
|
+
border-bottom: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.VPNavBar.has-sidebar .curtain,
|
|
21
|
+
.VPNavBar .divider {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// The bar is ruled edge to edge, but its contents line up with the page container.
|
|
26
|
+
//
|
|
27
|
+
// Only without a sidebar: on a doc page the default theme aligns the title on the sidebar and
|
|
28
|
+
// the rest on the content column, and capping the container here would break both.
|
|
29
|
+
|
|
30
|
+
.VPNavBar:not(.has-sidebar) .container {
|
|
31
|
+
max-width: #{mg.ref("layout-wide")};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// The gutters have to match the ones the hero uses, or the bar lands a few pixels off the
|
|
35
|
+
// content it sits above.
|
|
36
|
+
|
|
37
|
+
@media (min-width: 640px) {
|
|
38
|
+
.VPNavBar:not(.has-sidebar) .wrapper {
|
|
39
|
+
padding: 0 3rem;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (min-width: 960px) {
|
|
44
|
+
.VPNavBar:not(.has-sidebar) .wrapper {
|
|
45
|
+
padding: 0 4rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// With a sidebar the bar follows the same band as the page: the title column matches the
|
|
49
|
+
// sidebar, and the rest starts on the text column.
|
|
50
|
+
//
|
|
51
|
+
// The band is carried by the container, not by the title and the content: --ff-frame holds
|
|
52
|
+
// a percentage, so it has to land on an element whose containing block is the viewport.
|
|
53
|
+
// --vp-nav-col-offset is what the bar's own surface and bottom rule are drawn from.
|
|
54
|
+
|
|
55
|
+
.VPNavBar.has-sidebar {
|
|
56
|
+
--vp-nav-col-offset: calc(var(--ff-frame) + var(--vp-sidebar-width));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.VPNavBar.has-sidebar .wrapper {
|
|
60
|
+
padding: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.VPNavBar.has-sidebar .container {
|
|
64
|
+
max-width: none;
|
|
65
|
+
padding-right: var(--ff-frame);
|
|
66
|
+
padding-left: var(--ff-frame);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.VPNavBar.has-sidebar .container > .title {
|
|
70
|
+
min-width: var(--vp-sidebar-width);
|
|
71
|
+
max-width: var(--vp-sidebar-width);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.VPNavBar .content-body {
|
|
76
|
+
background: transparent;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Site name: display face, and a small accent square standing in for a logo when there is none.
|
|
80
|
+
|
|
81
|
+
.VPNavBarTitle .title {
|
|
82
|
+
border-bottom: 0;
|
|
83
|
+
gap: 0.625rem;
|
|
84
|
+
font-family: #{mg.ref("font-display")};
|
|
85
|
+
font-size: 0.9375rem;
|
|
86
|
+
font-weight: 620;
|
|
87
|
+
letter-spacing: -0.01em;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.VPNavBarTitle .title:not(:has(.logo))::before {
|
|
91
|
+
content: "";
|
|
92
|
+
width: 0.5rem;
|
|
93
|
+
height: 0.5rem;
|
|
94
|
+
background: #{mg.ref("color-accent")};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Menu links
|
|
98
|
+
|
|
99
|
+
.VPNavBarMenuLink,
|
|
100
|
+
.VPNavBarMenuGroup .button {
|
|
101
|
+
font-size: 0.875rem;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
color: #{mg.ref("color-ink-muted")};
|
|
104
|
+
transition: color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.VPNavBarMenuLink:hover,
|
|
108
|
+
.VPNavBarMenuGroup .button:hover {
|
|
109
|
+
color: #{mg.ref("color-ink")};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.VPNavBarMenuLink.active {
|
|
113
|
+
color: #{mg.ref("color-ink")};
|
|
114
|
+
text-decoration: underline;
|
|
115
|
+
text-decoration-color: #{mg.ref("color-accent")};
|
|
116
|
+
text-decoration-thickness: 2px;
|
|
117
|
+
text-underline-offset: 0.5rem;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Search trigger
|
|
121
|
+
|
|
122
|
+
.VPNavBarSearch .DocSearch-Button,
|
|
123
|
+
.VPNavBarSearchButton {
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
gap: 0.5rem;
|
|
127
|
+
padding: 0 0.5rem 0 0.625rem;
|
|
128
|
+
height: 2rem;
|
|
129
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
130
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
131
|
+
background: transparent;
|
|
132
|
+
font-size: 0.8125rem;
|
|
133
|
+
color: #{mg.ref("color-ink-faint")};
|
|
134
|
+
transition: border-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.VPNavBarSearchButton:hover {
|
|
138
|
+
border-color: #{mg.ref("color-rule-strong")};
|
|
139
|
+
color: #{mg.ref("color-ink-muted")};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.VPNavBarSearchButton .keys kbd,
|
|
143
|
+
.VPNavBarSearchButton .keys .key-cmd {
|
|
144
|
+
border: 0;
|
|
145
|
+
border-radius: 0;
|
|
146
|
+
background: transparent;
|
|
147
|
+
box-shadow: none;
|
|
148
|
+
font-family: #{mg.ref("font-mono")};
|
|
149
|
+
font-size: #{mg.ref("size-label")};
|
|
150
|
+
color: #{mg.ref("color-ink-faint")};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Appearance toggle: a square switch rather than the usual pill.
|
|
154
|
+
|
|
155
|
+
.VPSwitch {
|
|
156
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
157
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
158
|
+
background: transparent;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.VPSwitch .check {
|
|
162
|
+
border-radius: 2px;
|
|
163
|
+
background: #{mg.ref("color-surface-alt")};
|
|
164
|
+
box-shadow: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.VPSwitch .icon {
|
|
168
|
+
border-radius: 2px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ----------------------------------------------------------------------------------------- //
|
|
172
|
+
// Mobile local nav and full-screen menu
|
|
173
|
+
// ----------------------------------------------------------------------------------------- //
|
|
174
|
+
|
|
175
|
+
.VPLocalNav .menu-text,
|
|
176
|
+
.VPLocalNavOutlineDropdown .menu-text,
|
|
177
|
+
.VPLocalNavOutlineDropdown button {
|
|
178
|
+
font-family: #{mg.ref("font-mono")};
|
|
179
|
+
font-size: #{mg.ref("size-label")};
|
|
180
|
+
text-transform: uppercase;
|
|
181
|
+
letter-spacing: #{mg.ref("tracking-label")};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.VPNavScreen {
|
|
185
|
+
background: #{mg.ref("color-paper")};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.VPNavScreenMenuLink,
|
|
189
|
+
.VPNavScreenMenuGroupLink {
|
|
190
|
+
border-bottom: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
191
|
+
font-weight: 500;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// The search modal is teleported to <body>, so it sits outside the themed root.
|
|
196
|
+
|
|
197
|
+
.VPLocalSearchBox .shell {
|
|
198
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule-strong")};
|
|
199
|
+
border-radius: #{mg.ref("radius-md")};
|
|
200
|
+
background: #{mg.ref("color-paper")};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.VPLocalSearchBox .search-actions button,
|
|
204
|
+
.VPLocalSearchBox .search-keyboard-shortcuts {
|
|
205
|
+
font-family: #{mg.ref("font-mono")};
|
|
206
|
+
font-size: #{mg.ref("size-label")};
|
|
207
|
+
text-transform: uppercase;
|
|
208
|
+
letter-spacing: 0.06em;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.VPLocalSearchBox .titles .title {
|
|
212
|
+
font-weight: 500;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.VPLocalSearchBox .result {
|
|
216
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
217
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
218
|
+
background: transparent;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.VPLocalSearchBox .result.selected {
|
|
222
|
+
border-color: #{mg.ref("color-accent")};
|
|
223
|
+
background: #{mg.ref("color-accent-soft")};
|
|
224
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// ============================================================================================= //
|
|
2
|
+
// SIDEBAR //
|
|
3
|
+
// ============================================================================================= //
|
|
4
|
+
|
|
5
|
+
@use "theme" as mg;
|
|
6
|
+
|
|
7
|
+
.ff-theme {
|
|
8
|
+
// The top padding of the sidebar is what the sticky curtain is aligned on — the breathing room
|
|
9
|
+
// goes on the first group instead.
|
|
10
|
+
|
|
11
|
+
.VPSidebar {
|
|
12
|
+
border-right: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
13
|
+
background: #{mg.ref("color-paper")};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.VPSidebar .curtain {
|
|
17
|
+
background: #{mg.ref("color-paper")};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Space off the bar. On the nav, not on the first group: the first child of the nav is the
|
|
21
|
+
// hidden accessibility label, so :first-child never lands on a group.
|
|
22
|
+
|
|
23
|
+
.VPSidebar .nav {
|
|
24
|
+
padding-top: 1.5rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Sections are numbered from the stylesheet: 01, 02, 03 — no config, no markup.
|
|
28
|
+
|
|
29
|
+
.VPSidebar .nav {
|
|
30
|
+
counter-reset: ff-section;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.VPSidebar .group {
|
|
34
|
+
counter-increment: ff-section;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.VPSidebar .group + .group {
|
|
38
|
+
margin-top: 1.75rem;
|
|
39
|
+
padding-top: 1.5rem;
|
|
40
|
+
border-top: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.VPSidebar .group .VPSidebarItem.level-0 {
|
|
44
|
+
padding-bottom: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ----------------------------------------------------------------------------------------- //
|
|
48
|
+
// Section headings
|
|
49
|
+
//
|
|
50
|
+
// A section heading is a heading, not a caption: it carries the same weight as the page titles
|
|
51
|
+
// it introduces, and the number sits in the margin beside it.
|
|
52
|
+
// ----------------------------------------------------------------------------------------- //
|
|
53
|
+
|
|
54
|
+
.VPSidebar .group > .VPSidebarItem.level-0 > .item {
|
|
55
|
+
position: relative;
|
|
56
|
+
gap: 0.75rem;
|
|
57
|
+
padding-bottom: 0.75rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.VPSidebar .group > .VPSidebarItem.level-0 > .item::before {
|
|
61
|
+
content: counter(ff-section, decimal-leading-zero);
|
|
62
|
+
font-family: #{mg.ref("font-mono")};
|
|
63
|
+
font-size: #{mg.ref("size-label")};
|
|
64
|
+
font-weight: 600;
|
|
65
|
+
line-height: 1.4;
|
|
66
|
+
letter-spacing: 0.02em;
|
|
67
|
+
color: #{mg.ref("color-accent")};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.VPSidebarItem.level-0 > .item > .text {
|
|
71
|
+
padding: 0;
|
|
72
|
+
font-family: #{mg.ref("font-mono")};
|
|
73
|
+
font-size: #{mg.ref("size-label")};
|
|
74
|
+
font-weight: 600;
|
|
75
|
+
line-height: 1.4;
|
|
76
|
+
text-transform: uppercase;
|
|
77
|
+
letter-spacing: 0.08em;
|
|
78
|
+
color: #{mg.ref("color-ink")};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// ----------------------------------------------------------------------------------------- //
|
|
82
|
+
// Links
|
|
83
|
+
// ----------------------------------------------------------------------------------------- //
|
|
84
|
+
|
|
85
|
+
.VPSidebarItem.level-1 .text,
|
|
86
|
+
.VPSidebarItem.level-2 .text,
|
|
87
|
+
.VPSidebarItem.level-3 .text {
|
|
88
|
+
padding: 0.25rem 0;
|
|
89
|
+
font-size: 0.875rem;
|
|
90
|
+
font-weight: 450;
|
|
91
|
+
line-height: 1.6;
|
|
92
|
+
color: #{mg.ref("color-ink-muted")};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.VPSidebarItem.is-link.is-active > .item > .link > .text {
|
|
96
|
+
font-weight: 600;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Nested levels step down in size and hang off a rule.
|
|
100
|
+
|
|
101
|
+
.VPSidebarItem.level-1 .items {
|
|
102
|
+
margin-top: 0.25rem;
|
|
103
|
+
padding-left: 0.875rem;
|
|
104
|
+
border-left: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.VPSidebarItem.level-2 .text,
|
|
108
|
+
.VPSidebarItem.level-3 .text {
|
|
109
|
+
padding: 0.375rem 0;
|
|
110
|
+
font-size: 0.8125rem;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.VPSidebarItem.is-active > .item > .indicator {
|
|
114
|
+
top: 0.5rem;
|
|
115
|
+
bottom: 0.5rem;
|
|
116
|
+
width: #{mg.ref("rule-accent-width")};
|
|
117
|
+
border-radius: 0;
|
|
118
|
+
background-color: #{mg.ref("color-accent")};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// The caret of a collapsible section lines up with the text it folds.
|
|
122
|
+
|
|
123
|
+
.VPSidebarItem .caret {
|
|
124
|
+
margin-right: -0.5rem;
|
|
125
|
+
color: #{mg.ref("color-ink-faint")};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// ============================================================================================= //
|
|
2
|
+
// THEME CORE //
|
|
3
|
+
// ============================================================================================= //
|
|
4
|
+
|
|
5
|
+
// Magnesium, configured once for the whole theme. Every partial pulls the toolkit from here so
|
|
6
|
+
// the "ff" prefix stays defined in a single place.
|
|
7
|
+
|
|
8
|
+
@forward "pkg:@magnesium/theme" with ($prefix: "ff");
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
// ============================================================================================= //
|
|
2
|
+
// TOKENS //
|
|
3
|
+
// ============================================================================================= //
|
|
4
|
+
|
|
5
|
+
@use "theme" as mg;
|
|
6
|
+
|
|
7
|
+
// --------------------------------------------------------------------------------------------- //
|
|
8
|
+
// Scales
|
|
9
|
+
//
|
|
10
|
+
// Every value the theme uses lives here and is emitted as a --ff-* custom property. Downstream
|
|
11
|
+
// sites re-declare any of them in their own stylesheet — nothing else needs to be touched.
|
|
12
|
+
// --------------------------------------------------------------------------------------------- //
|
|
13
|
+
|
|
14
|
+
$scales: (
|
|
15
|
+
"font": (
|
|
16
|
+
"display": (Inter, ui-sans-serif, system-ui, sans-serif),
|
|
17
|
+
|
|
18
|
+
// The hero headline only. It borrows the mono the theme already speaks in its labels,
|
|
19
|
+
// section numbers and install line, so the front page sounds like the tool it documents.
|
|
20
|
+
"title": var(--vp-font-family-mono),
|
|
21
|
+
|
|
22
|
+
"body": var(--vp-font-family-base),
|
|
23
|
+
"mono": var(--vp-font-family-mono)
|
|
24
|
+
),
|
|
25
|
+
"tracking": (
|
|
26
|
+
"display": -0.025em,
|
|
27
|
+
"label": 0.1em
|
|
28
|
+
),
|
|
29
|
+
"size": (
|
|
30
|
+
"label": 0.6875rem,
|
|
31
|
+
"meta": 0.75rem,
|
|
32
|
+
"body": 1rem,
|
|
33
|
+
"lead": 1.125rem,
|
|
34
|
+
"h1": clamp(1.625rem, 1.3rem + 1.3vw, 2rem),
|
|
35
|
+
"h2": 1.5rem,
|
|
36
|
+
"h3": 1.1875rem,
|
|
37
|
+
"hero": clamp(1.75rem, 1.125rem + 2.5vw, 3rem)
|
|
38
|
+
),
|
|
39
|
+
"leading": (
|
|
40
|
+
"body": 1.75,
|
|
41
|
+
"tight": 1.15
|
|
42
|
+
),
|
|
43
|
+
"radius": (
|
|
44
|
+
"sm": 5px,
|
|
45
|
+
"md": 10px
|
|
46
|
+
),
|
|
47
|
+
"rule": (
|
|
48
|
+
"width": 1px,
|
|
49
|
+
"accent-width": 2px
|
|
50
|
+
),
|
|
51
|
+
"motion": (
|
|
52
|
+
"duration": 200ms,
|
|
53
|
+
"duration-slow": 420ms,
|
|
54
|
+
"ease": cubic-bezier(0.2, 0.6, 0.2, 1)
|
|
55
|
+
),
|
|
56
|
+
"banner": (
|
|
57
|
+
"height": 2.6875rem
|
|
58
|
+
),
|
|
59
|
+
"layout": (
|
|
60
|
+
"content": 44rem,
|
|
61
|
+
"wide": 76rem
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
// --------------------------------------------------------------------------------------------- //
|
|
66
|
+
// Colour schemes
|
|
67
|
+
//
|
|
68
|
+
// Warm neutrals rather than the usual cool greys: the theme should read like printed paper, and
|
|
69
|
+
// stay legible once the accent is swapped for a product colour.
|
|
70
|
+
// --------------------------------------------------------------------------------------------- //
|
|
71
|
+
|
|
72
|
+
$light: (
|
|
73
|
+
"color": (
|
|
74
|
+
"paper": #fbfaf8,
|
|
75
|
+
"surface": #ffffff,
|
|
76
|
+
"surface-alt": #f4f2ee,
|
|
77
|
+
"ink": #1a1917,
|
|
78
|
+
"ink-muted": #55524c,
|
|
79
|
+
"ink-faint": #8b867d,
|
|
80
|
+
"rule": #e6e2da,
|
|
81
|
+
"rule-strong": #d3cec4,
|
|
82
|
+
"accent": #2745cf,
|
|
83
|
+
"accent-hover": #1b34a8,
|
|
84
|
+
"accent-contrast": #ffffff,
|
|
85
|
+
"accent-soft": rgba(39, 69, 207, 0.09),
|
|
86
|
+
"accent-glow": rgba(39, 69, 207, 0.16),
|
|
87
|
+
"success": #1c7a52,
|
|
88
|
+
"warning": #8a5a00,
|
|
89
|
+
"danger": #b32835
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
$dark: (
|
|
94
|
+
"color": (
|
|
95
|
+
"paper": #121110,
|
|
96
|
+
"surface": #1a1917,
|
|
97
|
+
"surface-alt": #201e1b,
|
|
98
|
+
"ink": #ece9e3,
|
|
99
|
+
"ink-muted": #a5a099,
|
|
100
|
+
"ink-faint": #77726a,
|
|
101
|
+
"rule": #2c2a26,
|
|
102
|
+
"rule-strong": #423e38,
|
|
103
|
+
"accent": #94a8ff,
|
|
104
|
+
"accent-hover": #b5c2ff,
|
|
105
|
+
"accent-contrast": #101018,
|
|
106
|
+
"accent-soft": rgba(148, 168, 255, 0.13),
|
|
107
|
+
"accent-glow": rgba(148, 168, 255, 0.2),
|
|
108
|
+
"success": #4ac48b,
|
|
109
|
+
"warning": #e0a942,
|
|
110
|
+
"danger": #f0707f
|
|
111
|
+
)
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
// --------------------------------------------------------------------------------------------- //
|
|
115
|
+
// Emission
|
|
116
|
+
// --------------------------------------------------------------------------------------------- //
|
|
117
|
+
|
|
118
|
+
:root {
|
|
119
|
+
@include mg.emit($scales);
|
|
120
|
+
@include mg.emit($light);
|
|
121
|
+
|
|
122
|
+
color-scheme: light;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@include mg.scheme("dark", $selector: ".dark") {
|
|
126
|
+
@include mg.emit($dark);
|
|
127
|
+
|
|
128
|
+
color-scheme: dark;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// --------------------------------------------------------------------------------------------- //
|
|
132
|
+
// Bridge to the VitePress default theme
|
|
133
|
+
//
|
|
134
|
+
// The default theme is kept underneath, so its own variables are re-pointed at our tokens. Every
|
|
135
|
+
// component we do not restyle by hand still lands on the right palette.
|
|
136
|
+
// --------------------------------------------------------------------------------------------- //
|
|
137
|
+
|
|
138
|
+
:root {
|
|
139
|
+
--vp-c-bg: #{mg.ref("color-paper")};
|
|
140
|
+
--vp-c-bg-alt: #{mg.ref("color-surface-alt")};
|
|
141
|
+
--vp-c-bg-elv: #{mg.ref("color-surface")};
|
|
142
|
+
--vp-c-bg-soft: #{mg.ref("color-surface-alt")};
|
|
143
|
+
|
|
144
|
+
--vp-c-text-1: #{mg.ref("color-ink")};
|
|
145
|
+
--vp-c-text-2: #{mg.ref("color-ink-muted")};
|
|
146
|
+
--vp-c-text-3: #{mg.ref("color-ink-faint")};
|
|
147
|
+
|
|
148
|
+
--vp-c-border: #{mg.ref("color-rule-strong")};
|
|
149
|
+
--vp-c-divider: #{mg.ref("color-rule")};
|
|
150
|
+
--vp-c-gutter: #{mg.ref("color-rule")};
|
|
151
|
+
|
|
152
|
+
--vp-c-brand-1: #{mg.ref("color-accent")};
|
|
153
|
+
--vp-c-brand-2: #{mg.ref("color-accent-hover")};
|
|
154
|
+
--vp-c-brand-3: #{mg.ref("color-accent")};
|
|
155
|
+
--vp-c-brand-soft: #{mg.ref("color-accent-soft")};
|
|
156
|
+
|
|
157
|
+
--vp-c-default-1: #{mg.ref("color-rule-strong")};
|
|
158
|
+
--vp-c-default-2: #{mg.ref("color-rule")};
|
|
159
|
+
--vp-c-default-3: #{mg.ref("color-surface-alt")};
|
|
160
|
+
--vp-c-default-soft: #{mg.ref("color-accent-soft")};
|
|
161
|
+
|
|
162
|
+
--vp-c-tip-1: #{mg.ref("color-accent")};
|
|
163
|
+
--vp-c-tip-soft: transparent;
|
|
164
|
+
--vp-c-note-1: #{mg.ref("color-accent")};
|
|
165
|
+
--vp-c-note-soft: transparent;
|
|
166
|
+
--vp-c-success-1: #{mg.ref("color-success")};
|
|
167
|
+
--vp-c-success-soft: transparent;
|
|
168
|
+
--vp-c-warning-1: #{mg.ref("color-warning")};
|
|
169
|
+
--vp-c-warning-soft: transparent;
|
|
170
|
+
--vp-c-danger-1: #{mg.ref("color-danger")};
|
|
171
|
+
--vp-c-danger-soft: transparent;
|
|
172
|
+
--vp-c-caution-1: #{mg.ref("color-danger")};
|
|
173
|
+
--vp-c-caution-soft: transparent;
|
|
174
|
+
--vp-c-important-1: #{mg.ref("color-accent")};
|
|
175
|
+
--vp-c-important-soft: transparent;
|
|
176
|
+
|
|
177
|
+
/* Elevation is a hairline job here — only overlays keep a shadow. */
|
|
178
|
+
--vp-shadow-1: none;
|
|
179
|
+
--vp-shadow-2: none;
|
|
180
|
+
--vp-shadow-3: 0 16px 40px rgb(0 0 0 / 8%);
|
|
181
|
+
--vp-shadow-4: 0 16px 40px rgb(0 0 0 / 10%);
|
|
182
|
+
--vp-shadow-5: 0 24px 64px rgb(0 0 0 / 12%);
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Distance from the edge of the viewport to the content band — the frame the whole theme is
|
|
186
|
+
* built on. Only valid on elements whose containing block is the viewport, since the
|
|
187
|
+
* percentage resolves where the property is used.
|
|
188
|
+
*/
|
|
189
|
+
--ff-frame: max(4rem, calc((100% - #{mg.ref("layout-wide")}) / 2));
|
|
190
|
+
|
|
191
|
+
--vp-nav-height: 60px;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The nav bar and the local nav paint through their own ::before surface, so the colour goes on
|
|
195
|
+
* these knobs rather than on the elements. The local nav follows both by default.
|
|
196
|
+
*/
|
|
197
|
+
--vp-nav-bg-color: #{mg.ref("color-paper")};
|
|
198
|
+
--vp-nav-backdrop-filter: none;
|
|
199
|
+
--vp-layout-max-width: 76rem;
|
|
200
|
+
--vp-sidebar-width: 15rem;
|
|
201
|
+
--vp-header-anchor-symbol: "#";
|
|
202
|
+
|
|
203
|
+
--vp-code-font-size: 0.8125em;
|
|
204
|
+
--vp-code-color: #{mg.ref("color-ink")};
|
|
205
|
+
--vp-code-bg: #{mg.ref("color-surface-alt")};
|
|
206
|
+
--vp-code-block-color: #{mg.ref("color-ink-muted")};
|
|
207
|
+
--vp-code-block-bg: #{mg.ref("color-surface")};
|
|
208
|
+
--vp-code-block-divider-color: #{mg.ref("color-rule")};
|
|
209
|
+
--vp-code-copy-code-border-color: #{mg.ref("color-rule")};
|
|
210
|
+
--vp-code-copy-code-bg: #{mg.ref("color-surface")};
|
|
211
|
+
--vp-code-copy-code-hover-bg: #{mg.ref("color-surface-alt")};
|
|
212
|
+
--vp-code-tab-divider: #{mg.ref("color-rule")};
|
|
213
|
+
--vp-code-tab-active-bar-color: #{mg.ref("color-accent")};
|
|
214
|
+
|
|
215
|
+
--vp-button-brand-border: #{mg.ref("color-accent")};
|
|
216
|
+
--vp-button-brand-text: #{mg.ref("color-accent-contrast")};
|
|
217
|
+
--vp-button-brand-bg: #{mg.ref("color-accent")};
|
|
218
|
+
--vp-button-brand-hover-border: #{mg.ref("color-accent-hover")};
|
|
219
|
+
--vp-button-brand-hover-text: #{mg.ref("color-accent-contrast")};
|
|
220
|
+
--vp-button-brand-hover-bg: #{mg.ref("color-accent-hover")};
|
|
221
|
+
--vp-button-brand-active-bg: #{mg.ref("color-accent-hover")};
|
|
222
|
+
|
|
223
|
+
--vp-button-alt-border: #{mg.ref("color-rule-strong")};
|
|
224
|
+
--vp-button-alt-text: #{mg.ref("color-ink")};
|
|
225
|
+
--vp-button-alt-bg: transparent;
|
|
226
|
+
--vp-button-alt-hover-border: #{mg.ref("color-ink")};
|
|
227
|
+
--vp-button-alt-hover-text: #{mg.ref("color-ink")};
|
|
228
|
+
--vp-button-alt-hover-bg: transparent;
|
|
229
|
+
--vp-button-alt-active-bg: #{mg.ref("color-surface-alt")};
|
|
230
|
+
|
|
231
|
+
--vp-custom-block-font-size: 0.9375rem;
|
|
232
|
+
--vp-custom-block-code-font-size: 0.8125rem;
|
|
233
|
+
|
|
234
|
+
--vp-home-hero-name-color: #{mg.ref("color-ink")};
|
|
235
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// ============================================================================================= //
|
|
2
|
+
// @frontfactory/vitepress-theme //
|
|
3
|
+
// ============================================================================================= //
|
|
4
|
+
//
|
|
5
|
+
// Compiled to dist/style.css at publish time, so downstream sites need neither Sass nor Magnesium
|
|
6
|
+
// installed. Every value is exposed as a --ff-* custom property: override those, not this file.
|
|
7
|
+
//
|
|
8
|
+
// ============================================================================================= //
|
|
9
|
+
|
|
10
|
+
@use "tokens";
|
|
11
|
+
@use "base";
|
|
12
|
+
@use "nav";
|
|
13
|
+
@use "sidebar";
|
|
14
|
+
@use "doc";
|
|
15
|
+
@use "code";
|
|
16
|
+
@use "blocks";
|
|
17
|
+
@use "home";
|
|
18
|
+
@use "content";
|
|
19
|
+
@use "motion";
|