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

Syntax highlighting - support input to change styling #1784

Open
owilliams320 opened this issue Aug 4, 2020 · 2 comments
Open

Syntax highlighting - support input to change styling #1784

owilliams320 opened this issue Aug 4, 2020 · 2 comments
Assignees

Comments

@owilliams320
Copy link
Collaborator

Feature Request

Add ability to switch/change theme of Covalent syntax highlight component programmatically. Currently while trying to use the syntax highlighting component there is not a way to easily set or change the current color schemes programmatically with Angular.

highlightjs

What is the motivation / use case for changing the behavior?

This would help in theming cases where a User would switch to dark or light theme and would like see syntax highlighting matching that currently active theme

Which version of Angular and Material, and which browser and OS does this issue affect?

Angular 9.0

@owilliams320 owilliams320 self-assigned this Aug 4, 2020
@Zwartpet
Copy link
Contributor

You can overwrite the theming if you switch to dark-mode in your theme setup css file, eg:

// normal theme stuff

@include covalent-highlight-theme();

.dark-theme {
    @import '~highlight.js/styles/vs.css';
}

@owilliams320
Copy link
Collaborator Author

Example would be to support light / dark highlighting without changing the overall theme

Screen Shot 2020-10-02 at 3 55 03 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants