prism-color-variables
v1.0.1
Published
Extract prism colors to css variables
Downloads
3,508
Readme
prism-color-variables
Extract prism colors to css variables
Usage
Theme variables does not include prism base styles, include it first.
You can optinally include a basic color theme in themes
folder.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.css">
<link rel="stylesheet" href="node_modules/prism-color-variables/variables.css">
<link rel="stylesheet" href="node_modules/prism-color-variables/themes/duracula.css">
Or using js imports:
import 'prismjs/themes/prism.css';
import 'prism-color-variables/variables.css';
import 'prism-color-variables/themes/duracula.css';
By using less it is possible to inline different themes:
@import (inline) "npm://prismjs/themes/prism.css";
@import (inline) "npm://prism-color-variables/themes/visual-studio.css";
@media (prefers-color-scheme: dark) {
@import (inline) "npm://prism-color-variables/themes/duracula.css";
}