Skip to content

Commit

Permalink
feat: add CSS variables for markup diff tokens (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamyPesse authored Jun 11, 2024
1 parent 724b410 commit 84c0b53
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions packages/shiki/src/theme-css-variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,36 @@ export function createCssVariablesTheme(options: CssVariablesThemeOptions = {}):
foreground: variable('token-keyword'),
},
},
{
// [Custom] Diff
scope: [
'markup.inserted',
'meta.diff.header.to-file',
'punctuation.definition.inserted',
],
settings: {
foreground: variable('token-inserted'),
},
},
{
scope: [
'markup.deleted',
'meta.diff.header.from-file',
'punctuation.definition.deleted',
],
settings: {
foreground: variable('token-deleted'),
},
},
{
scope: [
'markup.changed',
'punctuation.definition.changed',
],
settings: {
foreground: variable('token-changed'),
},
},
],
}

Expand Down

0 comments on commit 84c0b53

Please sign in to comment.