From 84d2ecabe5cf66596f1f44fe7ca33fc3aa8ad750 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 18 Dec 2020 09:52:02 -0600 Subject: [PATCH] Highlight inline code snippets better --- src/stylus/core.styl | 4 ++-- src/stylus/theme.styl | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/stylus/core.styl b/src/stylus/core.styl index bec927d..e144ff6 100644 --- a/src/stylus/core.styl +++ b/src/stylus/core.styl @@ -34,10 +34,10 @@ body > h1, > h2, > h3, > h4, > h5, > h6 { color: var(--heading-fg) } *:first-child { margin-top: 0 } - &> p > code + > p code padding 0.1em 0.25em border-radius 0.25em - background-color rgba(255, 255, 255, 0.03) + background-color var(--inline-code-bg) &> header font-family var(--msff), monospace diff --git a/src/stylus/theme.styl b/src/stylus/theme.styl index 9de1555..dbecb50 100644 --- a/src/stylus/theme.styl +++ b/src/stylus/theme.styl @@ -52,6 +52,7 @@ light-theme = --bg #fff --header-bg #eee --fg #111 + --inline-code-bg #ddd dark-theme = for k, v in dark-syntax @@ -62,6 +63,7 @@ dark-theme = --header-bg #191919 --fg #fff --link-visited-fg #aaa + --inline-code-bg #222 :root, body.light-theme {light-theme}