1
+ /* Customize default theme styling by overriding CSS variables:
2
+ https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
3
+ */
4
+
5
+ /* Layouts */
6
+
7
+ /*
8
+ :root {
9
+ --vp-layout-max-width: 1440px;
10
+ } */
11
+
12
+ .VPHero .clip {
13
+ white-space : pre;
14
+ max-width : 500px ;
15
+ }
16
+
17
+ /* Fonts */
18
+
19
+ @font-face {
20
+ font-family : JuliaMono-Regular;
21
+ src : url ("https://cdn.jsdelivr.net/gh/cormullion/juliamono/webfonts/JuliaMono-Regular.woff2" );
22
+ }
23
+
24
+ : root {
25
+ /* Typography */
26
+ --vp-font-family-base : "Barlow" , "Inter var experimental" , "Inter var" ,
27
+ -apple-system, BlinkMacSystemFont, "Segoe UI" , Roboto, Oxygen, Ubuntu,
28
+ Cantarell, "Fira Sans" , "Droid Sans" , "Helvetica Neue" , sans-serif;
29
+
30
+ /* Code Snippet font */
31
+ --vp-font-family-mono : JuliaMono-Regular, monospace;
32
+
33
+ }
34
+
35
+ .mono {
36
+ /*
37
+ Disable contextual alternates (kind of like ligatures but different) in monospace,
38
+ which turns `/>` to an up arrow and `|>` (the Julia pipe symbol) to an up arrow as well.
39
+ This is pretty bad for Julia folks reading even though copy+paste retains the same text.
40
+ */
41
+ font-feature-settings : 'calt' 0 ;
42
+ pre {
43
+ font-family : JuliaMono-Light;
44
+ };
45
+ code {
46
+ font-family : JuliaMono-Light;
47
+ };
48
+ }
49
+
50
+ /* Colors */
51
+
52
+ : root {
53
+ - - julia- blue: # 4063D8;
54
+ - - julia- purple: # 9558B2;
55
+ - - julia- red: # CB3C33 ;
56
+ - - julia- green: # 389826;
57
+
58
+ - - vp- c- brand : # 389826;
59
+ - - vp- c- brand - light: # 3dd027;
60
+ - - vp- c- brand - lighter: # 9499ff;
61
+ - - vp- c- brand - lightest: # bcc0ff ;
62
+ - - vp- c- brand - dark: # 535bf2;
63
+ - - vp- c- brand - darker: # 454ce1;
64
+ - - vp- c- brand - dimm: # 212425;
65
+ }
66
+
67
+ /* Component: Button */
68
+
69
+ : root {
70
+ --vp-button-brand-border : var (--vp-c-brand-light );
71
+ --vp-button-brand-text : var (--vp-c-white );
72
+ --vp-button-brand-bg : var (--vp-c-brand );
73
+ --vp-button-brand-hover-border : var (--vp-c-brand-light );
74
+ --vp-button-brand-hover-text : var (--vp-c-white );
75
+ --vp-button-brand-hover-bg : var (--vp-c-brand-light );
76
+ --vp-button-brand-active-border : var (--vp-c-brand-light );
77
+ --vp-button-brand-active-text : var (--vp-c-white );
78
+ --vp-button-brand-active-bg : var (--vp-button-brand-bg );
79
+ }
80
+
81
+ /* Component: Home */
82
+
83
+ : root {
84
+ --vp-home-hero-name-color : transparent;
85
+ --vp-home-hero-name-background : -webkit-linear-gradient (
86
+ 120deg ,
87
+ # 9558B2 30% ,
88
+ # CB3C33
89
+ );
90
+
91
+ --vp-home-hero-image-background-image : linear-gradient (
92
+ -45deg ,
93
+ # 9558B2 30% ,
94
+ # 389826 30% ,
95
+ # CB3C33
96
+ );
97
+ --vp-home-hero-image-filter : blur (40px );
98
+ }
99
+
100
+ @media (min-width : 640px ) {
101
+ : root {
102
+ --vp-home-hero-image-filter : blur (56px );
103
+ }
104
+ }
105
+
106
+ @media (min-width : 960px ) {
107
+ : root {
108
+ --vp-home-hero-image-filter : blur (72px );
109
+ }
110
+ }
111
+
112
+ /* Component: Custom Block */
113
+
114
+ : root .dark {
115
+ --vp-custom-block-tip-border : var (--vp-c-brand );
116
+ --vp-custom-block-tip-text : var (--vp-c-brand-lightest );
117
+ --vp-custom-block-tip-bg : var (--vp-c-brand-dimm );
118
+
119
+ /* // Tweak the color palette for blacks and dark grays */
120
+ --vp-c-black : hsl (220 20% 9% );
121
+ --vp-c-black-pure : hsl (220 , 24% , 4% );
122
+ --vp-c-black-soft : hsl (220 16% 13% );
123
+ --vp-c-black-mute : hsl (220 14% 17% );
124
+ --vp-c-gray : hsl (220 8% 56% );
125
+ --vp-c-gray-dark-1 : hsl (220 10% 39% );
126
+ --vp-c-gray-dark-2 : hsl (220 12% 28% );
127
+ --vp-c-gray-dark-3 : hsl (220 12% 23% );
128
+ --vp-c-gray-dark-4 : hsl (220 14% 17% );
129
+ --vp-c-gray-dark-5 : hsl (220 16% 13% );
130
+
131
+ /* // Backgrounds */
132
+ /* --vp-c-bg: hsl(240, 2%, 11%); */
133
+ --vp-custom-block-info-bg : hsl (220 14% 17% );
134
+ /* --vp-c-gutter: hsl(220 20% 9%);
135
+
136
+ --vp-c-bg-alt: hsl(220 20% 9%);
137
+ --vp-c-bg-soft: hsl(220 14% 17%);
138
+ --vp-c-bg-mute: hsl(220 12% 23%);
139
+ */
140
+ }
141
+
142
+ /* Component: Algolia */
143
+
144
+ .DocSearch {
145
+ --docsearch-primary-color : var (--vp-c-brand ) !important ;
146
+ }
147
+
148
+ /* Component: MathJax */
149
+
150
+ mjx-container > svg {
151
+ display : block;
152
+ margin : auto;
153
+ }
154
+
155
+ mjx-container {
156
+ padding : 0.5rem 0 ;
157
+ }
158
+
159
+ mjx-container {
160
+ display : inline-block;
161
+ margin : auto 2px -2px ;
162
+ }
163
+
164
+ mjx-container > svg {
165
+ margin : auto;
166
+ display : inline-block;
167
+ }
168
+
169
+ /**
170
+ * Colors links
171
+ * -------------------------------------------------------------------------- */
172
+
173
+ : root {
174
+ --vp-c-brand-1 : # CB3C33 ;
175
+ --vp-c-brand-2 : # CB3C33 ;
176
+ --vp-c-brand-3 : # CB3C33 ;
177
+ --vp-c-sponsor : # ca2971 ;
178
+ --vitest-c-sponsor-hover : # c13071 ;
179
+ }
180
+
181
+ .dark {
182
+ --vp-c-brand-1 : # 91dd33 ;
183
+ --vp-c-brand-2 : # 91dd33 ;
184
+ --vp-c-brand-3 : # 91dd33 ;
185
+ --vp-c-sponsor : # 91dd33 ;
186
+ --vitest-c-sponsor-hover : # e51370 ;
187
+ }
188
+
189
+ /**
190
+ * Change images from light to dark theme
191
+ * -------------------------------------------------------------------------- */
192
+
193
+ : root : not (.dark ) .dark-only {
194
+ display : none;
195
+ }
196
+
197
+ : root : is (.dark ) .light-only {
198
+ display : none;
199
+ }
200
+
201
+ /* https://bddxg.top/article/note/vitepress优化/一些细节上的优化.html#文档页面调整-加宽 */
202
+
203
+ .VPDoc .has-aside .content-container {
204
+ max-width : 100% !important ;
205
+ }
206
+ .aside {
207
+ max-width : 200px !important ;
208
+ padding-left : 0 !important ;
209
+ }
210
+ .VPDoc {
211
+ padding-top : 15px !important ;
212
+ padding-left : 5px !important ;
213
+
214
+ }
215
+ /* This one does the right menu */
216
+
217
+ .VPDocOutlineItem li {
218
+ text-overflow : ellipsis;
219
+ overflow : hidden;
220
+ white-space : nowrap;
221
+ max-width : 200px ;
222
+ }
223
+
224
+ .VPNavBar .title {
225
+ text-overflow : ellipsis;
226
+ overflow : hidden;
227
+ white-space : nowrap;
228
+ }
229
+
230
+ @media (max-width : 960px ) {
231
+ .VPDoc {
232
+ padding-left : 25px !important ;
233
+ }
234
+ }
235
+
236
+ /* This one does the left menu */
237
+
238
+ /* .VPSidebarItem .VPLink p {
239
+ text-overflow: ellipsis;
240
+ overflow: hidden;
241
+ white-space: nowrap;
242
+ max-width: 200px;
243
+ } */
0 commit comments