Scoped themes for highlight.js
npm install hljs-themesScoped themes for highlight.js
``bash`
yarn add hljs-themes
`bash`
bower install hljs-themes --save
scss
// typical-theme.scss
.hljs {
// these styles override all other themes
}
`$3
`scss
// scoped-theme.scss
.my-theme {
.hljs {
// now I can easily switch between themes or create a
// reusable component where a theme can passed as a parameter
}
}
`
$3
ember-themed-syntax addon`handlebars
{{#themed-syntax lang="handlebars" theme="github-gist"}}
{{! code }}
{{/themed-syntax}}
`$3
http://demos.evolutionaryapps.com/EmberThemedSyntax
$3
To contribute, fork this branch and provide your theme scoped to a corresponding namespace. Also, please provide a
transparent class for users who want to opt-out from using a background color. This project uses SCSS, but please compile and provide SCSS, CSS, and minified CSS file as well. Thanks!
`scss
// my-custom-hljs-theme.scss
.my-custom-hljs-theme {
&.transparent {
.hljs {
background: none;
}
}
.hljs {
//...
}
}
``