Skip to content

Commit

Permalink
fix: fix code and table color normalize, close #243
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Sep 12, 2024
1 parent 8411b00 commit bbd69e0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
21 changes: 9 additions & 12 deletions themes/theme-default/src/client/styles/normalize.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ a {
}

code {
background-color: var(--vp-c-bg-alt);
color: var(--vp-c-text-mute);
font-family: var(--code-font-family);
transition: background-color var(--vp-t-color);

:not(pre) > & {
background-color: var(--vp-c-grey-soft);
color: var(--vp-c-text-mute);
transition: background-color var(--vp-t-color);
}

p a & {
color: var(--vp-c-accent);
Expand All @@ -55,15 +58,9 @@ table {
transition: border-color var(--vp-t-color);
}

tr {
&:nth-child(odd) {
background-color: var(--vp-c-bg-alt);
transition: background-color var(--vp-t-color);

code {
background-color: var(--vp-c-gutter);
}
}
tbody tr:nth-child(odd) {
background-color: var(--vp-c-bg-alt);
transition: background-color var(--vp-t-color);
}

th,
Expand Down
4 changes: 2 additions & 2 deletions themes/theme-default/src/client/styles/vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
--docsearch-highlight-color: var(--vp-c-accent);
--docsearch-muted-color: var(--vp-c-text-mute);
--docsearch-container-background: rgb(9 10 17 / 80%);
--docsearch-modal-background: var(--vp-c-bg-alt);
--docsearch-searchbox-background: var(--vp-c-bg-alt);
--docsearch-modal-background: var(--vp-c-bg-elv);
--docsearch-searchbox-background: var(--vp-c-bg-elv);
--docsearch-searchbox-focus-background: var(--vp-c-bg);
--docsearch-searchbox-shadow: inset 0 0 0 2px var(--vp-c-accent-soft);
--docsearch-hit-color: var(--vp-c-text-mute);
Expand Down
2 changes: 1 addition & 1 deletion tools/helper/src/client/styles/normalize.scss
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ table {
border-collapse: collapse;
}

tr:nth-child(odd) {
tbody tr:nth-child(odd) {
background: #f6f8fa;
}

Expand Down

0 comments on commit bbd69e0

Please sign in to comment.