From 40899da9a810a2b0f31c24ff5d43b12486034ae7 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 4 Nov 2021 09:56:30 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20code=20block=20style=20wit?= =?UTF-8?q?hin=20links?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + assets/css/compiled/main.css | 9 +++++++-- tailwind.config.js | 9 ++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 405c7fb8..666f21c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Site logo image dimensions are unconstrained ([#19](https://github.com/jpanther/congo/issues/19)) - Article summary styled incorrectly in dark mode +- Links containing `code` blocks styled incorrectly ## [1.4.0] - 2021-10-20 diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index d4b87fe5..71794fb9 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -787,7 +787,7 @@ video { } .prose a code { - color: #111827; + color: var(--color-secondary-700); } .prose pre { @@ -2457,6 +2457,11 @@ body a, body button { text-decoration-color: var(--color-neutral-500); } +.dark .dark\:prose-light a:hover { + color: var(--color-neutral); + text-decoration: none; +} + .dark .dark\:prose-light strong { color: var(--color-neutral); } @@ -2503,7 +2508,7 @@ body a, body button { } .dark .dark\:prose-light a code { - color: var(--color-neutral); + color: var(--color-secondary-400); } .dark .dark\:prose-light pre { diff --git a/tailwind.config.js b/tailwind.config.js index 5c1de438..43b53067 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -111,6 +111,9 @@ module.exports = { code: { color: theme("colors.secondary.700"), }, + "a code": { + color: theme("colors.secondary.700"), + }, "pre code": { color: theme("colors.neutral.700"), }, @@ -150,6 +153,10 @@ module.exports = { a: { color: theme("colors.primary.400"), textDecorationColor: theme("colors.neutral.500"), + "&:hover": { + color: theme("colors.neutral.DEFAULT"), + textDecoration: "none", + }, }, strong: { color: theme("colors.neutral.DEFAULT"), @@ -186,7 +193,7 @@ module.exports = { color: theme("colors.secondary.400"), }, "a code": { - color: theme("colors.neutral.DEFAULT"), + color: theme("colors.secondary.400"), }, pre: { color: theme("colors.neutral.200"),