From c1efaec93d0ece80877702a12172da066b97ffdc Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Tue, 23 Jun 2020 01:02:16 -0700 Subject: [PATCH] feat: Update CodeDef to handle dark mode --- src/components/CodeDef/CodeDef.module.scss | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/components/CodeDef/CodeDef.module.scss b/src/components/CodeDef/CodeDef.module.scss index 290b27d0f..edbd3ec66 100644 --- a/src/components/CodeDef/CodeDef.module.scss +++ b/src/components/CodeDef/CodeDef.module.scss @@ -5,6 +5,10 @@ .identifier { color: var(--color-neutrals-700); + + :global(.dark-mode) & { + color: var(--color-dark-600); + } } .type { @@ -12,6 +16,11 @@ 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 { @@ -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 { @@ -34,6 +51,10 @@ .string { color: var(--color-green-500); + + :global(.dark-mode) & { + color: var(--color-green-200); + } } .number {