fix(typst): style CodeArgKey via HighlightStyle, not theme CSS
Build and Deploy Verso / deploy (push) Successful in 13m38s
Build and Deploy Verso / deploy (push) Successful in 13m38s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user