1- @import url (https://fonts.googleapis.com/css?family=Space+Mono:regular, italic, 700 , 700italic );
2- @import url (https://fonts.googleapis.com/css?family=Space+Grotesk:regular, italic, 700 , 700italic );
3-
41/* Customize default theme styling by overriding CSS variables:
52https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
63 */
@@ -19,24 +16,43 @@ https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/var
1916
2017/* Fonts */
2118
19+ @font-face {
20+ font-family : JuliaMono-Regular;
21+ src : url ("https://cdn.jsdelivr.net/gh/cormullion/juliamono/webfonts/JuliaMono-Regular.woff2" );
22+ }
23+
2224 : root {
2325 /* Typography */
2426 --vp-font-family-base : "Barlow" , "Inter var experimental" , "Inter var" ,
2527 -apple-system, BlinkMacSystemFont, "Segoe UI" , Roboto, Oxygen, Ubuntu,
2628 Cantarell, "Fira Sans" , "Droid Sans" , "Helvetica Neue" , sans-serif;
2729
2830 /* Code Snippet font */
29- --vp-font-family-mono : Menlo, Monaco, Consolas, "Courier New" ,
30- monospace;
31+ --vp-font-family-mono : JuliaMono-Regular, monospace;
32+
33+ }
34+
35+ /*
36+ Disable contextual alternates (kind of like ligatures but different) in monospace,
37+ which turns `/>` to an up arrow and `|>` (the Julia pipe symbol) to an up arrow as well.
38+ This is pretty bad for Julia folks reading even though copy+paste retains the same text.
39+ */
40+ /* Target elements with class 'mono' */
41+ .mono-no-substitutions {
42+ font-family : "JuliaMono-Light" , monospace;
43+ font-feature-settings : "calt" off;
3144}
3245
33- .mono {
34- /*
35- Disable contextual alternates (kind of like ligatures but different) in monospace,
36- which turns `/>` to an up arrow and `|>` (the Julia pipe symbol) to an up arrow as well.
37- This is pretty bad for Julia folks reading even though copy+paste retains the same text.
38- */
39- font-feature-settings : 'calt' 0 ;
46+ /* Alternatively, you can use the following if you prefer: */
47+ .mono-no-substitutions-alt {
48+ font-family : "JuliaMono-Light" , monospace;
49+ font-variant-ligatures : none;
50+ }
51+
52+ /* If you want to apply this globally to all monospace text: */
53+ pre , code {
54+ font-family : "JuliaMono-Light" , monospace;
55+ font-feature-settings : "calt" off;
4056}
4157
4258/* Colors */
@@ -177,3 +193,74 @@ mjx-container > svg {
177193 --vp-c-sponsor : # 91dd33 ;
178194 --vitest-c-sponsor-hover : # e51370 ;
179195}
196+
197+ /**
198+ * Change images from light to dark theme
199+ * -------------------------------------------------------------------------- */
200+
201+ : root : not (.dark ) .dark-only {
202+ display : none;
203+ }
204+
205+ : root : is (.dark ) .light-only {
206+ display : none;
207+ }
208+
209+ /* https://bddxg.top/article/note/vitepress优化/一些细节上的优化.html#文档页面调整-加宽 */
210+
211+ .VPDoc .has-aside .content-container {
212+ max-width : 100% !important ;
213+ }
214+ .aside {
215+ max-width : 200px !important ;
216+ padding-left : 0 !important ;
217+ }
218+ .VPDoc {
219+ padding-top : 15px !important ;
220+ padding-left : 5px !important ;
221+
222+ }
223+ /* This one does the right menu */
224+
225+ .VPDocOutlineItem li {
226+ text-overflow : ellipsis;
227+ overflow : hidden;
228+ white-space : nowrap;
229+ max-width : 200px ;
230+ }
231+
232+ .VPNavBar .title {
233+ text-overflow : ellipsis;
234+ overflow : hidden;
235+ white-space : nowrap;
236+ }
237+
238+ @media (max-width : 960px ) {
239+ .VPDoc {
240+ padding-left : 25px !important ;
241+ }
242+ }
243+
244+ /* This one does the left menu */
245+
246+ /* .VPSidebarItem .VPLink p {
247+ text-overflow: ellipsis;
248+ overflow: hidden;
249+ white-space: nowrap;
250+ max-width: 200px;
251+ } */
252+
253+
254+ /* Component: Docstring Custom Block */
255+
256+ .jldocstring .custom-block {
257+ border : 1px solid var (--vp-c-gray-2 );
258+ color : var (--vp-c-text-1 )
259+ }
260+
261+ .jldocstring .custom-block summary {
262+ font-weight : 700 ;
263+ cursor : pointer;
264+ user-select : none;
265+ margin : 0 0 8px ;
266+ }
0 commit comments