Skip to content

Commit

Permalink
feat: Update CodeDef to handle dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 23, 2020
1 parent 15a1ccb commit c1efaec
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/components/CodeDef/CodeDef.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@

.identifier {
color: var(--color-neutrals-700);

:global(.dark-mode) & {
color: var(--color-dark-600);
}
}

.type {
padding: 0.125rem;
border-radius: 0.125rem;
color: var(--color-green-500);
background: var(--color-green-050);

:global(.dark-mode) & {
color: var(--color-green-600);
background: var(--color-green-100);
}
}

.comment {
Expand All @@ -20,12 +29,20 @@
> p {
display: inline;
}

:global(.dark-mode) & {
color: var(--color-dark-400);
}
}

.keyword,
.bracket,
.operator {
color: var(--color-neutrals-600);

:global(.dark-mode) & {
color: var(--color-dark-500);
}
}

.block {
Expand All @@ -34,6 +51,10 @@

.string {
color: var(--color-green-500);

:global(.dark-mode) & {
color: var(--color-green-200);
}
}

.number {
Expand Down

0 comments on commit c1efaec

Please sign in to comment.