Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code highlighting colors in mdjs viewer are not in line with normal markdown code blocks #87

Closed
gerjanvangeest opened this issue Mar 16, 2021 · 1 comment

Comments

@gerjanvangeest
Copy link
Contributor

I would like to customize some colors of the markdown code blocks, which goes easy with e.g. --markdown-syntax-color (and other variables). But this is not possible for the code examples inside mdjs viewer.

If they are in sync i could just assign a color to the variable once.

So i suggest to use the markdown-syntax variables in your code as well:

.token.function,
.token.class-name {
    color: #6f42c1;
}

Becomes:

.token.function {
    color: var(--markdown-syntax-function-color, #6f42c1);
}

.token.class-name {
    color: var(--markdown-syntax-class-name-color, #6f42c1);
}
@daKmoR
Copy link
Member

daKmoR commented Apr 25, 2021

the code block is now rendered into the light dom and slotted in. Therefore it will now follow the markdown code highlighting

@daKmoR daKmoR closed this as completed Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants