sass-site/source/assets/js/playground/theme.ts

32 lines
785 B
TypeScript
Raw Normal View History

import { HighlightStyle } from '@codemirror/language';
import { tags } from '@lezer/highlight';
2023-06-02 16:53:32 +02:00
const playgroundHighlightStyle = HighlightStyle.define([
{
tag: [tags.special(tags.variableName), tags.tagName],
color: 'var(--sl-color--code-base)'
},
{ tag: tags.keyword,
color: 'var(--sl-color--code-bright-dark)',
fontWeight: '600'
},
{ tag: tags.definitionKeyword,
color: 'var(--sl-color--code-dark)',
fontWeight: '600'
},
{ tag: tags.comment,
color: 'var(--sl-color--code-muted)',
fontStyle: 'italic'
},
{ tag: tags.propertyName,
color: 'var(--sl-color--code-warm)',
fontWeight: '600'
},
{ tag: tags.className,
color: 'var(--sl-color--code-cool)',
fontWeight: '600'
},
]);
2023-06-13 18:42:28 +02:00
export { playgroundHighlightStyle };