Skip to content

Commit

Permalink
Merge branch 'main' into fix-no-unwrap-error-message-for-thrown-snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Nov 2, 2023
2 parents 301389a + 9fe3873 commit f99feeb
Show file tree
Hide file tree
Showing 19 changed files with 1,556 additions and 1,405 deletions.
4 changes: 2 additions & 2 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export default withPwa(defineConfig({
lastUpdated: true,
markdown: {
theme: {
light: 'vitesse-light',
dark: 'vitesse-dark',
light: 'github-light',
dark: 'github-dark',
},
},
themeConfig: {
Expand Down
7 changes: 6 additions & 1 deletion docs/.vitepress/scripts/pwa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ export const pwa: PwaOptions = {
},
workbox: {
navigateFallbackDenylist: [/^\/new$/],
globPatterns: ['**/*.{css,js,html,png,svg,ico,txt,woff2}'],
// warning: sponsors/antfu.svg is 2.51 MB, and won't be precached
maximumFileSizeToCacheInBytes: 3 * 1024 * 1024, // <== 3MB
globPatterns: ['**/*.{css,js,html,png,svg,ico,txt,woff2,json}'],
runtimeCaching: [
{
urlPattern: pwaFontsRegex,
Expand Down Expand Up @@ -111,4 +113,7 @@ export const pwa: PwaOptions = {
},
],
},
experimental: {
includeAllowlist: true,
},
}
76 changes: 76 additions & 0 deletions docs/.vitepress/style/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,86 @@ html:not(.dark) [img-dark] {

/* Overrides */

.sp .sp-link.link:hover,
.sp .sp-link.link:focus {
background-color: var(--vitest-c-sponsor-hover) !important;
}

/* outline styles for buttons and VPButton anchors */
button:focus,
button:focus-visible,
.DocSearch-Button:focus,
.DocSearch-Button:focus-visible,
a:focus-visible,
a:focus {
border-radius: 2px;
outline: 2px solid var(--vp-c-text-1);
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
outline: none !important;
}

/* custom block styles */
html:not(.dark) .custom-block.tip code {
color: var(--vitest-custom-block-tip-code-text) !important;
}
html:not(.dark) .custom-block.info code {
color: var(--vitest-custom-block-info-code-text) !important;
}
.custom-block.tip a:hover,
.vp-doc .custom-block.tip a:hover > code {
color: var(--vp-c-brand-1) !important;
opacity: 1;
}
.custom-block.info a:hover,
.vp-doc .custom-block.info a:hover > code {
color: var(--vp-c-brand-1) !important;
opacity: 1;
}
html:not(.dark) .custom-block.info a:hover,
html:not(.dark) .vp-doc .custom-block.info a:hover > code {
color: var(--vitest-custom-block-info-code-text) !important;
opacity: 1;
}
.custom-block.warning a:hover,
.vp-doc .custom-block.warning a:hover > code {
color: var(--vp-c-warning-1) !important;
opacity: 1;
}
.custom-block.danger a:hover,
.vp-doc .custom-block.danger a:hover > code {
color: var(--vp-c-danger-1) !important;
opacity: 1;
}

/* search # styles */
:not(.dark) .title-icon {
opacity: 1 !important;
}
.dark .title-icon {
opacity: 0.67 !important;
}

.VPSocialLink {
transform: scale(0.9);
}

.vp-doc a {
text-decoration-style: dotted;
}
.custom-block a:focus,
.custom-block a:active,
.custom-block a:hover,
.custom-block a:active,
.vp-doc a:focus,
.vp-doc a:active,
.vp-doc a:hover,
.vp-doc a:active {
text-decoration: underline;
}

.vp-doc th, .vp-doc td {
padding: 6px 10px;
border: 1px solid #8882;
Expand Down
63 changes: 30 additions & 33 deletions docs/.vitepress/style/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,44 @@
* -------------------------------------------------------------------------- */

:root {
--vp-c-accent: #dab40b;
--vp-c-brand: #6da13f;
--vp-c-brand-1: var(--vp-c-brand-dark);
--vp-c-brand-2: var(--vp-c-brand-darker);
--vp-c-brand-light: #7ec242;
--vp-c-brand-lighter: #93d31c;
--vp-c-brand-dark: #668d11;
--vp-c-brand-darker: #52730d;
--vp-c-text-code: #5d6f5d;
--vp-code-block-bg: rgba(125,125,125,0.04);
--vp-c-text-light-2: rgba(56 56 56 / 70%);
/* fix contrast: lang name on gray code block */
--vp-c-text-dark-3: rgba(180, 180, 180, 0.7);
--vp-code-copy-code-bg: rgba(125,125,125,0.1);
--vp-code-copy-code-hover-bg: rgba(125,125,125,0.2);
--vp-c-disabled-bg: rgba(125,125,125,0.2);
--vp-c-brand-1: #52730d;
--vp-c-brand-2: #57791b;
--vp-c-brand-3: #506e10;
--vp-c-sponsor: #ca2971;
--vitest-c-sponsor-hover: #c13071;
}

.dark {
--vp-code-block-bg: rgba(0,0,0,0.2);
--vp-c-text-code: #c0cec0;
/* fix contrast on gray cards: check the same above (this is the default) */
--vp-c-text-dark-2: rgba(235, 235, 235, 0.60);
/* fix lang name: check the same above (this is the default) */
--vp-c-text-dark-3: rgba(235, 235, 235, 0.38);
--vp-c-brand-1: #add467;
--vp-c-brand-2: #a7cc66;
--vp-c-brand-3: #acd268;
--vp-c-sponsor: #ee4e95;
--vitest-c-sponsor-hover: #e51370;
}


/**
* Component: Button
* Component: Custom Block
* -------------------------------------------------------------------------- */

:root {
--vp-button-brand-border: var(--vp-c-brand-light);
--vp-button-brand-text: var(--vp-c-text-dark-1);
--vp-button-brand-bg: var(--vp-c-brand);
--vp-button-brand-hover-border: var(--vp-c-brand-light);
--vp-button-brand-hover-text: var(--vp-c-text-dark-1);
--vp-button-brand-hover-bg: var(--vp-c-brand-light);
--vp-button-brand-active-border: var(--vp-c-brand-light);
--vp-button-brand-active-text: var(--vp-c-text-dark-1);
--vp-button-brand-active-bg: var(--vp-button-brand-bg);
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
--vp-custom-block-danger-code-bg: #a79fa029;
--vitest-custom-block-tip-code-text: #4a680c;
--vitest-custom-block-info-code-text: #394f0c
}

.dark {
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
--vp-custom-block-danger-code-bg: #6c6a6a2b;
}

/**
* Component: Button
* -------------------------------------------------------------------------- */
.dark {
--vp-button-brand-text: #243600;
--vp-button-brand-active-text: #243600;
--vp-button-brand-hover-text: #243600;
}

/**
Expand Down
Loading

0 comments on commit f99feeb

Please sign in to comment.