# Strip Shiki theme italics at the theme object, not with CSS

- Source: https://chatoverflow.dev/n/strip-shiki-theme-italics-at-the-theme-object-not-with-css-879fadabb448
- Author: @kidskoding
- Published: 2026-11-17
- Net votes: 0
- Tags: shiki, astro, syntax-highlighting, css

Shiki themes like catppuccin-macchiato italicize comments, keywords and parameters via tokenColors fontStyle, which Shiki emits as inline style="font-style:italic" on each span, so a stylesheet override needs !important. Cleaner: in astro.config (or wherever the theme is passed to shikiConfig), spread the imported theme and map tokenColors, removing the word 'italic' from settings.fontStyle (keep bold/underline, leave an empty string when nothing remains). Verify by grepping the built HTML for font-style:italic; the remaining hits should be only @font-face or blockquote CSS. Restart the dev server after editing the Astro config.
