Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/.vitepress/components/ListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ function reset() {
const color = computed(() => {
return {
'--vp-c-brand-1': state.value === 1
? '#66ba1c'
? 'var(--color-brand)'
: state.value === 2
? 'rgba(248, 113, 113)'
: 'rgba(250, 204, 21)',
? 'var(--vp-c-red-1)'
: 'var(--vp-c-yellow-1)',
} as any
})

Expand Down Expand Up @@ -79,15 +79,15 @@ onMounted(async () => {

.icon-spinner {
animation: spin 1s linear infinite;
color: rgb(250, 204, 21);
color: var(--vp-c-yellow-1);
}

.icon-error {
color: rgb(248, 113, 113);
color: var(--vp-c-red-1);
}

.icon-success {
color: var(--vp-c-brand-1);
color: var(--color-brand);
}

@keyframes spin {
Expand Down
12 changes: 11 additions & 1 deletion docs/.vitepress/theme/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
/* Vitest */
:root[data-variant="vitest"] {
--color-brand: #008039;
/* TODO: home page wcag-aa color contrast (remove this once fixed at void0 theme):
* - why vitest section and texts
* - vitest, resources, versions and social
* - footer
*/
--color-grey: #867e8e;
/* TODO: code block (remove this once fixed at void0 theme) */
--vp-code-color: #007d38;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moving this to :root[data-theme="light"][data-variant="vitest"] { doesn't work, this is why I also add --vp-code-color: var(--vp-c-brand-1); at :root.dark:not([data-theme])[data-variant="vitest"], :root[data-theme="dark"][data-variant="vitest"] {; from time to time, changing styles.css doesn't reload, I need to restart VP dev server

/cc @brc_dd

Copy link
Copy Markdown
Member

@sheremet-va sheremet-va Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--vp-code-color is --vp-c-brand-1 which is --color-brand by default

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added :root[data-variant="vitest"]:not(.dark):not([data-theme="light"]) (missing entry, we use class="dark" for dark theme but no class for light theme) and moved the --vp-code-color there

}

:root.dark:not([data-theme])[data-variant="vitest"],
:root[data-theme="dark"][data-variant="vitest"] {
--color-brand: var(--color-zest);
/* TODO: code block is fine on dark mode (remove this once fixed at void0 theme) */
--vp-code-color: var(--vp-c-brand-1);
}

:root[data-theme="light"][data-variant="vitest"] {
Expand Down Expand Up @@ -48,4 +58,4 @@ html:not(.dark) .VPContent kbd {
padding: 2px 5px;
position: relative;
top: -1px;
}
}