From e3d6536baa96b49d83540535e47ca6b91f12d354 Mon Sep 17 00:00:00 2001 From: imochoa <18612100+imochoa@users.noreply.github.com> Date: Sat, 24 Aug 2024 10:43:46 +0200 Subject: [PATCH 1/2] targetting only inline code with tailwind typography https://aaronfrancis.com/2023/targeting-only-inline-code-elements-with-tailwind-typography-3b5e8d43 --- tailwind.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tailwind.config.js b/tailwind.config.js index 04004f53a..c711d4382 100755 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,5 @@ const theme = require("./src/config/theme.json"); +const plugin = require("tailwindcss/plugin"); let font_base = Number(theme.fonts.font_size.base.replace("px", "")); let font_scale = Number(theme.fonts.font_size.scale); @@ -90,5 +91,11 @@ module.exports = { 5: "3rem", }, }), + plugin(function ({ addVariant }) { + addVariant( + "prose-inline-code", + '&.prose :where(:not(pre)>code):not(:where([class~="not-prose"] *))', + ); + }), ], }; From 6074cd525f7456eb123df74faefcbd86d9442574 Mon Sep 17 00:00:00 2001 From: imochoa <18612100+imochoa@users.noreply.github.com> Date: Sat, 24 Aug 2024 10:44:32 +0200 Subject: [PATCH 2/2] ugly workaround to astro issue --- src/layouts/PostSingle.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/PostSingle.astro b/src/layouts/PostSingle.astro index 66d66bfaf..1ef057c4b 100755 --- a/src/layouts/PostSingle.astro +++ b/src/layouts/PostSingle.astro @@ -74,7 +74,7 @@ const { title, description, author, categories, image, date, tags } = post.data; {dateFormat(date)} -
+