From 8ed44cc352ce009cddfc341cb0bf9ab17116ccbc Mon Sep 17 00:00:00 2001 From: claude Date: Tue, 9 Jun 2026 19:56:20 +0000 Subject: [PATCH] fix(typst): style CodeArgKey via HighlightStyle, not theme CSS The tok-attributeName CSS class relies on each theme defining it, but 26 of 41 themes never had it. Defining the colour directly in typstHighlightStyle (like we do for heading/strong/emphasis) applies it universally regardless of which theme is active. Amber #c47900 is legible on both light and dark backgrounds. Co-Authored-By: Claude Sonnet 4.6 --- .../js/features/source-editor/languages/typst/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/web/frontend/js/features/source-editor/languages/typst/index.ts b/services/web/frontend/js/features/source-editor/languages/typst/index.ts index 508e94e7d7..1ee40eb856 100644 --- a/services/web/frontend/js/features/source-editor/languages/typst/index.ts +++ b/services/web/frontend/js/features/source-editor/languages/typst/index.ts @@ -101,8 +101,9 @@ const typstHighlightStyle = HighlightStyle.define([ { tag: t.heading, fontWeight: 'bold' }, { tag: t.strong, fontWeight: 'bold' }, { tag: t.emphasis, fontStyle: 'italic' }, - // Diagnostic: force arg keys bright red so we can confirm the token reaches the highlighter. - { tag: t.attributeName, color: '#cc0000', fontWeight: 'bold' }, + // Named arg keys (fill:, caption:, columns:…) — amber colour that reads + // well on both light and dark backgrounds, independent of theme CSS. + { tag: t.attributeName, color: '#c47900' }, ]) export const typst = () => {