Skip to content

Commit

Permalink
Merge pull request #19 from skirtles-code/vitepress-rc.12
Browse files Browse the repository at this point in the history
Upgrade VitePress to 1.0.0-rc.12
  • Loading branch information
skirtles-code authored Sep 28, 2023
2 parents 883edb6 + d5cfb3d commit 084cf49
Show file tree
Hide file tree
Showing 4 changed files with 268 additions and 223 deletions.
File renamed without changes.
57 changes: 56 additions & 1 deletion docs/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
:root {
/* Switch the theme to green */
--vp-c-brand-1: var(--vp-c-green-1);
--vp-c-brand-2: var(--vp-c-green-2);
--vp-c-brand-3: var(--vp-c-green-3);
--vp-c-brand-soft: var(--vp-c-green-soft);

/* green-1 is too dark, so use green-2 instead */
--vp-home-hero-name-color: var(--vp-c-brand-2);

/* Revert inline code to the old theme, so it doesn't look like a link */
--vp-code-color: #476582;

/* Put borders on code and custom blocks */
--vue-land-code-block-border: var(--vp-c-divider);

--vp-custom-block-danger-border: hsla(358, 75%, 44%, 0.4);
--vp-custom-block-warning-border: hsla(32, 95%, 44%, 0.4);
--vp-custom-block-tip-border: hsla(153, 25%, 44%, 0.4);
--vp-custom-block-info-border: hsla(240, 10%, 64%, 0.4);
}

/* Borders on custom blocks in dark mode */
html:not(.dark) {
--vp-custom-block-danger-bg: hsl(350, 81%, 96%);
--vp-custom-block-warning-bg: hsl(45, 93%, 94%);
--vp-custom-block-tip-bg: hsl(160, 81%, 98%);
--vp-custom-block-info-bg: hsl(240, 6%, 97%);
}

.dark {
/* Inline code for the dark theme */
--vp-code-color: #c9def1;
}

/* Apply a border to code blocks and code groups */
.vp-doc div[class*='language-'] {
border: 1px solid var(--vue-land-code-block-border);
}

.vp-code-group > .tabs {
border: 1px solid var(--vue-land-code-block-border);
border-bottom: 0 none;
}

.vp-code-group > .blocks > div[class*='language-'] {
border-top: 0 none;
}

/* green-1 is much too close to black in the sidebar */
html:not(.dark) .VPSidebar {
--vp-c-brand-1: var(--vp-c-brand-3);
}

/* Put arrows next to the sidebar items, otherwise the wrapping makes them difficult to read */
.VPSidebarItem.level-1 .VPLink::before {
border: 3px solid transparent;
border-left: 4px solid var(--vp-c-text-2);
Expand All @@ -9,5 +64,5 @@
}

.VPSidebarItem.level-1.is-active .VPLink::before {
border-left-color: var(--vp-c-brand);
border-left-color: var(--vp-c-brand-1);
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"rimraf": "^5.0.1",
"vitepress": "1.0.0-beta.2"
"vitepress": "1.0.0-rc.12"
}
}
Loading

0 comments on commit 084cf49

Please sign in to comment.