Skip to content

Commit

Permalink
fix(log): incorrect color in light mode
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat616 committed Dec 26, 2023
1 parent 0c7e12f commit 211bc44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/components/log/log-item.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.item {
/* stylelint-disable-next-line selector-pseudo-class-no-unknown */
:global(.shiki) {
margin-top: 0.25em;
margin-bottom: 0;
Expand All @@ -10,8 +9,15 @@
}

span {
color: var(--shiki-dark) !important;
white-space: normal;
}
}

&.dark {
:global(.shiki) {
span {
color: var(--shiki-dark) !important;
}
}
}
}
6 changes: 5 additions & 1 deletion src/components/log/log-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ const LogItem = (props: Props) => {
}
>
<span
className={classNames(styles.item, "data")}
className={classNames(
styles.item,
theme.palette.mode === "dark" && styles.dark,
"data",
)}
dangerouslySetInnerHTML={{
__html: payload,
}}
Expand Down

0 comments on commit 211bc44

Please sign in to comment.