diff --git a/.vitepress/theme/style.css b/.vitepress/theme/style.css index 129e50a..ef18794 100644 --- a/.vitepress/theme/style.css +++ b/.vitepress/theme/style.css @@ -2,6 +2,10 @@ @tailwind components; @tailwind utilities; +.vp-code span { + color: var(--shiki-dark, inherit); +} + :root { --c-brand: #3eaf7c; --c-brand-light: #4abf8a; @@ -31,6 +35,18 @@ p img { display: none; } +h3 .header-anchor { + display: inline-block; + position: absolute; + left: -1em; + text-decoration: none; + color: var(--c-brand); +} + +h3 .header-anchor:before { + content: '#'; +} + /** * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML. * Based on https://github.com/chriskempson/tomorrow-theme @@ -149,3 +165,24 @@ span.lang { .custom-block.tip:before { color: #42b883; } + +.prose :where(:not(pre)>code):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: #0a3760; + padding: 0.25em 0.4em; + border-radius: 4px; + background-color: #eee; +} + +.prose + :where(code):not( + :where([class~='not-prose'], [class~='not-prose'] *) + )::before { + content: '' !important; +} + +.prose + :where(code):not( + :where([class~='not-prose'], [class~='not-prose'] *) + )::after { + content: '' !important; +}