diff --git a/README.md b/README.md index dc70299..a956561 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,15 @@ Syntax.js [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Syntax.js%2C%20a%20free%20JavaScript%20syntax%20highlighter&url=https://github.com/williamtroup/Syntax.js&hashtags=javascript,syntax,highlighter) -[![npm](https://img.shields.io/badge/npmjs-v2.3.1-blue)](https://www.npmjs.com/package/jsyntax.js) -[![nuget](https://img.shields.io/badge/nuget-v2.3.1-purple)](https://www.nuget.org/packages/jSyntax.js/) +[![npm](https://img.shields.io/badge/npmjs-v2.4.0-blue)](https://www.npmjs.com/package/jsyntax.js) +[![nuget](https://img.shields.io/badge/nuget-v2.4.0-purple)](https://www.nuget.org/packages/jSyntax.js/) [![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/williamtroup/Syntax.js/blob/main/LICENSE.txt) [![discussions Welcome](https://img.shields.io/badge/discussions-Welcome-red)](https://github.com/williamtroup/Syntax.js/discussions) [![coded by William Troup](https://img.shields.io/badge/coded_by-William_Troup-yellow)](https://github.com/williamtroup) >

A lightweight, and easy-to-use, JavaScript library for code syntax highlighting!

->

v2.3.1

+>

v2.4.0


![Syntax.js](docs/images/main.png) diff --git a/README_NUGET.md b/README_NUGET.md index 653bc97..ecb5078 100644 --- a/README_NUGET.md +++ b/README_NUGET.md @@ -1,8 +1,8 @@ -# Syntax.js v2.3.1 +# Syntax.js v2.4.0 [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Syntax.js%2C%20a%20free%20JavaScript%20syntax%20highlighter&url=https://github.com/williamtroup/Syntax.js&hashtags=javascript,syntax,highlighter) -[![npm](https://img.shields.io/badge/npmjs-v2.3.1-blue)](https://www.npmjs.com/package/jsyntax.js) -[![nuget](https://img.shields.io/badge/nuget-v2.3.1-purple)](https://www.nuget.org/packages/jSyntax.js/) +[![npm](https://img.shields.io/badge/npmjs-v2.4.0-blue)](https://www.npmjs.com/package/jsyntax.js) +[![nuget](https://img.shields.io/badge/nuget-v2.4.0-purple)](https://www.nuget.org/packages/jSyntax.js/) [![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/williamtroup/Syntax.js/blob/main/LICENSE.txt) [![discussions Welcome](https://img.shields.io/badge/discussions-Welcome-red)](https://github.com/williamtroup/Syntax.js/discussions) [![coded by William Troup](https://img.shields.io/badge/coded_by-William_Troup-yellow)](https://github.com/williamtroup) diff --git a/dist/languages/syntax.bash.js b/dist/languages/syntax.bash.js index 55642e6..380d2b3 100644 --- a/dist/languages/syntax.bash.js +++ b/dist/languages/syntax.bash.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "bash", { friendlyName: "Bash", keywords: [ diff --git a/dist/languages/syntax.c-plus-plus.js b/dist/languages/syntax.c-plus-plus.js index f43e62a..1f40492 100644 --- a/dist/languages/syntax.c-plus-plus.js +++ b/dist/languages/syntax.c-plus-plus.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "c-plus-plus", { friendlyName: "C++", keywords: [ diff --git a/dist/languages/syntax.c-sharp.js b/dist/languages/syntax.c-sharp.js index 277eeeb..24f79f1 100644 --- a/dist/languages/syntax.c-sharp.js +++ b/dist/languages/syntax.c-sharp.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "c-sharp", { friendlyName: "C#", keywords: [ diff --git a/dist/languages/syntax.c.js b/dist/languages/syntax.c.js index 0576798..a862ef1 100644 --- a/dist/languages/syntax.c.js +++ b/dist/languages/syntax.c.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "c", { friendlyName: "C", keywords: [ diff --git a/dist/languages/syntax.css.js b/dist/languages/syntax.css.js index 3ba2416..f8268b5 100644 --- a/dist/languages/syntax.css.js +++ b/dist/languages/syntax.css.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "css", { friendlyName: "CSS", keywords: [ diff --git a/dist/languages/syntax.dart.js b/dist/languages/syntax.dart.js index b6c9bf1..6f1f30f 100644 --- a/dist/languages/syntax.dart.js +++ b/dist/languages/syntax.dart.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "dart", { friendlyName: "Dart", keywords: [ diff --git a/dist/languages/syntax.delphi.js b/dist/languages/syntax.delphi.js index 33a32d5..6cd28d2 100644 --- a/dist/languages/syntax.delphi.js +++ b/dist/languages/syntax.delphi.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "delphi", { friendlyName: "Delphi", keywords: [ diff --git a/dist/languages/syntax.f-sharp.js b/dist/languages/syntax.f-sharp.js index f67bfdc..77f2dcf 100644 --- a/dist/languages/syntax.f-sharp.js +++ b/dist/languages/syntax.f-sharp.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "f-sharp", { friendlyName: "F#", keywords: [ diff --git a/dist/languages/syntax.go.js b/dist/languages/syntax.go.js index 94b1763..9968356 100644 --- a/dist/languages/syntax.go.js +++ b/dist/languages/syntax.go.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "go", { friendlyName: "Go", keywords: [ diff --git a/dist/languages/syntax.html.js b/dist/languages/syntax.html.js index f758502..7d98331 100644 --- a/dist/languages/syntax.html.js +++ b/dist/languages/syntax.html.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "html", { friendlyName: "HTML", keywords: [ diff --git a/dist/languages/syntax.java.js b/dist/languages/syntax.java.js index 5ad213c..e3c3945 100644 --- a/dist/languages/syntax.java.js +++ b/dist/languages/syntax.java.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "java", { friendlyName: "Java", keywords: [ diff --git a/dist/languages/syntax.javascript.js b/dist/languages/syntax.javascript.js index 788ba06..940084d 100644 --- a/dist/languages/syntax.javascript.js +++ b/dist/languages/syntax.javascript.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "javascript", { friendlyName: "JavaScript", keywords: [ diff --git a/dist/languages/syntax.kotlin.js b/dist/languages/syntax.kotlin.js index 0c39396..456c446 100644 --- a/dist/languages/syntax.kotlin.js +++ b/dist/languages/syntax.kotlin.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "kotlin", { friendlyName: "Kotlin", keywords: [ diff --git a/dist/languages/syntax.lua.js b/dist/languages/syntax.lua.js index 3113921..67ff77b 100644 --- a/dist/languages/syntax.lua.js +++ b/dist/languages/syntax.lua.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "lua", { friendlyName: "Lua", keywords: [ diff --git a/dist/languages/syntax.matlab.js b/dist/languages/syntax.matlab.js index 1646189..a40daef 100644 --- a/dist/languages/syntax.matlab.js +++ b/dist/languages/syntax.matlab.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "matlab", { friendlyName: "Matlab", keywords: [ diff --git a/dist/languages/syntax.ms-sql.js b/dist/languages/syntax.ms-sql.js index aebda4a..2ed60ca 100644 --- a/dist/languages/syntax.ms-sql.js +++ b/dist/languages/syntax.ms-sql.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "ms-sql", { friendlyName: "MS SQL", keywords: [ diff --git a/dist/languages/syntax.perl.js b/dist/languages/syntax.perl.js index 140c451..75c4a9b 100644 --- a/dist/languages/syntax.perl.js +++ b/dist/languages/syntax.perl.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "perl", { friendlyName: "Perl", keywords: [ diff --git a/dist/languages/syntax.php.js b/dist/languages/syntax.php.js index 8e439a1..6eb5393 100644 --- a/dist/languages/syntax.php.js +++ b/dist/languages/syntax.php.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "php", { friendlyName: "PHP", keywords: [ diff --git a/dist/languages/syntax.powershell.js b/dist/languages/syntax.powershell.js index e9b7c7b..1f1c999 100644 --- a/dist/languages/syntax.powershell.js +++ b/dist/languages/syntax.powershell.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "powershell", { friendlyName: "Powershell", keywords: [ diff --git a/dist/languages/syntax.python.js b/dist/languages/syntax.python.js index 5b6816e..8b1c9b0 100644 --- a/dist/languages/syntax.python.js +++ b/dist/languages/syntax.python.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "python", { friendlyName: "Python", keywords: [ diff --git a/dist/languages/syntax.r.js b/dist/languages/syntax.r.js index 85ca282..9a90319 100644 --- a/dist/languages/syntax.r.js +++ b/dist/languages/syntax.r.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "r", { friendlyName: "R", keywords: [ diff --git a/dist/languages/syntax.ruby.js b/dist/languages/syntax.ruby.js index bcb0cf1..d048cbf 100644 --- a/dist/languages/syntax.ruby.js +++ b/dist/languages/syntax.ruby.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "ruby", { friendlyName: "Ruby", keywords: [ diff --git a/dist/languages/syntax.rust.js b/dist/languages/syntax.rust.js index 2940971..734bbc4 100644 --- a/dist/languages/syntax.rust.js +++ b/dist/languages/syntax.rust.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "rust", { friendlyName: "Rust", keywords: [ diff --git a/dist/languages/syntax.scala.js b/dist/languages/syntax.scala.js index 977cb5b..896e94b 100644 --- a/dist/languages/syntax.scala.js +++ b/dist/languages/syntax.scala.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "scala", { friendlyName: "Scala", keywords: [ diff --git a/dist/languages/syntax.swift.js b/dist/languages/syntax.swift.js index 28e115f..2bb9594 100644 --- a/dist/languages/syntax.swift.js +++ b/dist/languages/syntax.swift.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "swift", { friendlyName: "Swift", keywords: [ diff --git a/dist/languages/syntax.typescript.js b/dist/languages/syntax.typescript.js index e9376f8..f73d8e1 100644 --- a/dist/languages/syntax.typescript.js +++ b/dist/languages/syntax.typescript.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "typescript", { friendlyName: "TypeScript", keywords: [ diff --git a/dist/languages/syntax.visual-basic.js b/dist/languages/syntax.visual-basic.js index 773db42..933d6db 100644 --- a/dist/languages/syntax.visual-basic.js +++ b/dist/languages/syntax.visual-basic.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ $syntax.addLanguage( "visual-basic", { friendlyName: "Visual Basic", keywords: [ diff --git a/dist/syntax.js b/dist/syntax.js index 96498e3..2475716 100644 --- a/dist/syntax.js +++ b/dist/syntax.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ (function() { function render() { var tagTypes = _configuration.highlightAllDomElementTypes; @@ -1087,7 +1087,7 @@ return this; }; this.getVersion = function() { - return "2.3.1"; + return "2.4.0"; }; (function(documentObject, navigatorObject, windowObject) { _parameter_Document = documentObject; diff --git a/dist/syntax.js.css b/dist/syntax.js.css index 78d5f64..4f4e5b6 100644 --- a/dist/syntax.js.css +++ b/dist/syntax.js.css @@ -1,50 +1,50 @@ /* - * Syntax.js Library v2.3.1 + * Syntax.js Library v2.4.0 * * Copyright 2023 Bunoon * Released under the MIT License */ :root { - --color-keyword: #A71500; - --color-value: #F28C28; - --color-attribute: #730dd9; - --color-keyword-hover: #FF0000; - --color-value-hover: #FFAC1C; - --color-attribute-hover: #a656f5; - --color-comment: #78b13f; - --color-multi-line-comment: var(--color-comment); - --color-string: #484dd2; - --color-multi-line-string: var(--color-string); - --color-black: #3b3a3a; - --color-white: #F5F5F5; - --color-dark-gray: #808080; - --color-gray: #BBBBBB; - --color-lighter-gray: #C0C0C0; - --container-background-color: #e8e6e6; - --container-border-color: var(--color-black); - --container-syntax-background-color: #EEEEEE; - --container-syntax-border-color: #CCCCCC; - --container-numbers-background-color: #dddddd; - --container-numbers-border-color: var(--color-gray); - --container-description-background-color: var(--container-numbers-background-color); - --container-description-border-color: var(--container-numbers-border-color); - --tab-background-color: var(--color-white); - --tab-text-color: var(--color-black); - --tab-border-color: var(--color-black); - --tab-active-background-color: var(--color-black); - --tab-active-text-color: var(--color-white); - --tab-active-border-color: var(--color-black); - --tab-hover-background-color: var(--container-numbers-background-color); - --tab-hover-text-color: var(--color-black); - --tab-hover-border-color: var(--color-black); - --button-background-color: var(--color-black); - --button-text-color: var(--color-white); - --button-hover-background-color: var(--color-dark-gray); - --button-hover-text-color: var(--color-white); - --border-radius: 0.5rem; - --border-style-scrollbar: inset 0 0 6px var(--color-dark-gray); - --border-size: 0.5px; - --transition: all .3s; + --syntax-js-color-keyword: #A71500; + --syntax-js-color-value: #F28C28; + --syntax-js-color-attribute: #730dd9; + --syntax-js-color-keyword-hover: #FF0000; + --syntax-js-color-value-hover: #FFAC1C; + --syntax-js-color-attribute-hover: #a656f5; + --syntax-js-color-comment: #78b13f; + --syntax-js-color-multi-line-comment: var(--syntax-js-color-comment); + --syntax-js-color-string: #484dd2; + --syntax-js-color-multi-line-string: var(--syntax-js-color-string); + --syntax-js-color-black: #3b3a3a; + --syntax-js-color-white: #F5F5F5; + --syntax-js-color-dark-gray: #808080; + --syntax-js-color-gray: #BBBBBB; + --syntax-js-color-lighter-gray: #C0C0C0; + --syntax-js-container-background-color: #e8e6e6; + --syntax-js-container-border-color: var(--syntax-js-color-black); + --syntax-js-container-syntax-background-color: #EEEEEE; + --syntax-js-container-syntax-border-color: #CCCCCC; + --syntax-js-container-numbers-background-color: #dddddd; + --syntax-js-container-numbers-border-color: var(--syntax-js-color-gray); + --syntax-js-container-description-background-color: var(--syntax-js-container-numbers-background-color); + --syntax-js-container-description-border-color: var(--syntax-js-container-numbers-border-color); + --syntax-js-tab-background-color: var(--syntax-js-color-white); + --syntax-js-tab-text-color: var(--syntax-js-color-black); + --syntax-js-tab-border-color: var(--syntax-js-color-black); + --syntax-js-tab-active-background-color: var(--syntax-js-color-black); + --syntax-js-tab-active-text-color: var(--syntax-js-color-white); + --syntax-js-tab-active-border-color: var(--syntax-js-color-black); + --syntax-js-tab-hover-background-color: var(--syntax-js-container-numbers-background-color); + --syntax-js-tab-hover-text-color: var(--syntax-js-color-black); + --syntax-js-tab-hover-border-color: var(--syntax-js-color-black); + --syntax-js-button-background-color: var(--syntax-js-color-black); + --syntax-js-button-text-color: var(--syntax-js-color-white); + --syntax-js-button-hover-background-color: var(--syntax-js-color-dark-gray); + --syntax-js-button-hover-text-color: var(--syntax-js-color-white); + --syntax-js-border-radius: 0.5rem; + --syntax-js-border-style-scrollbar: inset 0 0 6px var(--syntax-js-color-dark-gray); + --syntax-js-border-size: 0.5px; + --syntax-js-transition: all .3s; } /* @@ -59,14 +59,14 @@ div.syntax-highlight { } code.syntax-highlight div.code, div.syntax-highlight div.code { - background-color: var(--container-background-color); - border-radius: var(--border-radius); + background-color: var(--syntax-js-container-background-color); + border-radius: var(--syntax-js-border-radius); padding: 15px; overflow-x: auto; overflow-y: hidden; position: relative; - border: var(--border-size) solid var(--container-border-color); - color: var(--color-black); + border: var(--syntax-js-border-size) solid var(--syntax-js-container-border-color); + color: var(--syntax-js-color-black); } code.syntax-highlight div.code div.tabs, div.syntax-highlight div.code div.tabs { @@ -87,7 +87,7 @@ div.syntax-highlight div.code div.tabs button.tab-active { padding: 10px; padding-left: 15px; padding-right: 15px; - border-radius: var(--border-radius); + border-radius: var(--syntax-js-border-radius); margin: 0 !important; margin-right: 10px !important; cursor: default; @@ -101,23 +101,23 @@ div.syntax-highlight div.code div.tabs button.tab-active:last-child { } code.syntax-highlight div.code div.tabs button.tab, div.syntax-highlight div.code div.tabs button.tab { - background-color: var(--tab-background-color); - color: var(--tab-text-color); - border: var(--border-size) solid var(--tab-border-color); + background-color: var(--syntax-js-tab-background-color); + color: var(--syntax-js-tab-text-color); + border: var(--syntax-js-border-size) solid var(--syntax-js-tab-border-color); } code.syntax-highlight div.code div.tabs button.tab:hover, div.syntax-highlight div.code div.tabs button.tab:hover { cursor: pointer; - background-color: var(--tab-hover-background-color); - color: var(--tab-hover-text-color); - border: var(--border-size) solid var(--tab-hover-border-color); - transition: var(--transition); + background-color: var(--syntax-js-tab-hover-background-color); + color: var(--syntax-js-tab-hover-text-color); + border: var(--syntax-js-border-size) solid var(--syntax-js-tab-hover-border-color); + transition: var(--syntax-js-transition); } code.syntax-highlight div.code div.tabs button.tab-active, div.syntax-highlight div.code div.tabs button.tab-active { - background-color: var(--tab-active-background-color); - color: var(--tab-active-text-color); - border: var(--border-size) solid var(--tab-active-border-color); + background-color: var(--syntax-js-tab-active-background-color); + color: var(--syntax-js-tab-active-text-color); + border: var(--syntax-js-border-size) solid var(--syntax-js-tab-active-border-color); font-weight: 700; } code.syntax-highlight div.code div.tab-contents, @@ -138,14 +138,14 @@ div.syntax-highlight div.code div.tab-contents div.description { user-select: none; cursor: default; margin-right: 15px; - background-color: var(--container-description-background-color); + background-color: var(--syntax-js-container-description-background-color); padding: 10px; padding-left: 15px; padding-right: 15px; - border-radius: var(--border-radius); + border-radius: var(--syntax-js-border-radius); text-align: left; - border: var(--border-size) solid var(--container-description-border-color); - color: var(--color-black); + border: var(--syntax-js-border-size) solid var(--syntax-js-container-description-border-color); + color: var(--syntax-js-color-black); width: 150px; display: none; } @@ -164,21 +164,21 @@ div.syntax-highlight div.code div.tab-contents div.numbers { user-select: none; cursor: default; margin-right: 15px; - background-color: var(--container-numbers-background-color); + background-color: var(--syntax-js-container-numbers-background-color); padding: 10px; padding-left: 15px; padding-right: 15px; - border-radius: var(--border-radius); + border-radius: var(--syntax-js-border-radius); text-align: right; font-weight: 800 !important; - border: var(--border-size) solid var(--container-numbers-border-color); + border: var(--syntax-js-border-size) solid var(--syntax-js-container-numbers-border-color); display: none; } code.syntax-highlight div.code div.tab-contents div.numbers p, div.syntax-highlight div.code div.tab-contents div.numbers p { margin: 0; text-wrap: nowrap; - color: var(--color-black); + color: var(--syntax-js-color-black); } @media (min-width: 768px) { code.syntax-highlight div.code div.tab-contents div.numbers, @@ -190,9 +190,9 @@ code.syntax-highlight div.code div.tab-contents div.syntax, div.syntax-highlight div.code div.tab-contents div.syntax { flex-grow: 1; padding: 10px; - border-radius: var(--border-radius); - background-color: var(--container-syntax-background-color); - border: var(--border-size) solid var(--container-syntax-border-color); + border-radius: var(--syntax-js-border-radius); + background-color: var(--syntax-js-container-syntax-background-color); + border: var(--syntax-js-border-size) solid var(--syntax-js-container-syntax-border-color); position: relative; overflow: hidden; } @@ -214,14 +214,14 @@ code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.bu code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label, div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button, div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label { - color: var(--button-text-color); - background-color: var(--button-background-color); + color: var(--syntax-js-button-text-color); + background-color: var(--syntax-js-button-background-color); padding: 7px; padding-left: 10px; padding-right: 10px; display: inline-block; border: none; - border-right: 1px dotted var(--color-gray); + border-right: 1px dotted var(--syntax-js-color-gray); font-size: small; margin: 0 !important; outline: none !important; @@ -230,13 +230,13 @@ code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.bu code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:first-child, div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:first-child, div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:first-child { - border-bottom-left-radius: var(--border-radius); + border-bottom-left-radius: var(--syntax-js-border-radius); } code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:last-child, code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:last-child, div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:last-child, div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:last-child { - border-top-right-radius: var(--border-radius); + border-top-right-radius: var(--syntax-js-border-radius); border-right: none; } code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button-opener, @@ -246,22 +246,22 @@ div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.but code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label, div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label { cursor: default; - color: var(--color-gray); + color: var(--syntax-js-color-gray); font-weight: 700; flex: 1; } code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:hover, div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:hover { cursor: pointer; - background-color: var(--button-hover-background-color); - color: var(--button-hover-text-color); - transition: var(--transition); + background-color: var(--syntax-js-button-hover-background-color); + color: var(--syntax-js-button-hover-text-color); + transition: var(--syntax-js-transition); } code.syntax-highlight div.code div.tab-contents div.syntax p, div.syntax-highlight div.code div.tab-contents div.syntax p { margin: 0; text-wrap: initial; - color: var(--color-black); + color: var(--syntax-js-color-black); } @media (min-width: 768px) { code.syntax-highlight div.code div.tab-contents div.syntax p, @@ -274,14 +274,14 @@ code.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clicka div.syntax-highlight div.code div.tab-contents div.syntax p span.keyword, div.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable { font-weight: 700; - color: var(--color-keyword); + color: var(--syntax-js-color-keyword); } code.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable:hover, code.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-keyword-clickable:hover, div.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable:hover, div.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-keyword-clickable:hover { - color: var(--color-keyword-hover); - transition: var(--transition); + color: var(--syntax-js-color-keyword-hover); + transition: var(--syntax-js-transition); cursor: pointer; } code.syntax-highlight div.code div.tab-contents div.syntax p span.value, @@ -289,14 +289,14 @@ code.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickabl div.syntax-highlight div.code div.tab-contents div.syntax p span.value, div.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable { font-weight: 700; - color: var(--color-value); + color: var(--syntax-js-color-value); } code.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable:hover, code.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-value-clickable:hover, div.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable:hover, div.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-value-clickable:hover { - color: var(--color-value-hover); - transition: var(--transition); + color: var(--syntax-js-color-value-hover); + transition: var(--syntax-js-transition); cursor: pointer; } code.syntax-highlight div.code div.tab-contents div.syntax p span.attribute, @@ -304,33 +304,33 @@ code.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clic div.syntax-highlight div.code div.tab-contents div.syntax p span.attribute, div.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable { font-weight: 700; - color: var(--color-attribute); + color: var(--syntax-js-color-attribute); } code.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable:hover, code.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-attribute-clickable:hover, div.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable:hover, div.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-attribute-clickable:hover { - color: var(--color-attribute-hover); - transition: var(--transition); + color: var(--syntax-js-color-attribute-hover); + transition: var(--syntax-js-transition); cursor: pointer; } code.syntax-highlight div.code div.tab-contents div.syntax p span.comment, div.syntax-highlight div.code div.tab-contents div.syntax p span.comment { font-style: italic; - color: var(--color-comment); + color: var(--syntax-js-color-comment); } code.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-comment, div.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-comment { font-style: italic; - color: var(--color-multi-line-comment); + color: var(--syntax-js-color-multi-line-comment); } code.syntax-highlight div.code div.tab-contents div.syntax p span.string, div.syntax-highlight div.code div.tab-contents div.syntax p span.string { - color: var(--color-string); + color: var(--syntax-js-color-string); } code.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-string, div.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-string { - color: var(--color-multi-line-string); + color: var(--syntax-js-color-multi-line-string); } /* @@ -342,17 +342,17 @@ div.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-stri width: 12px; } .custom-scroll-bars::-webkit-scrollbar-track { - -webkit-box-shadow: var(--border-style-scrollbar); - box-shadow: var(--border-style-scrollbar); + -webkit-box-shadow: var(--syntax-js-border-style-scrollbar); + box-shadow: var(--syntax-js-border-style-scrollbar); } .custom-scroll-bars::-webkit-scrollbar-thumb { - -webkit-box-shadow: var(--border-style-scrollbar); - box-shadow: var(--border-style-scrollbar); - background: var(--color-white); + -webkit-box-shadow: var(--syntax-js-border-style-scrollbar); + box-shadow: var(--syntax-js-border-style-scrollbar); + background: var(--syntax-js-color-white); } .custom-scroll-bars::-webkit-scrollbar-thumb:hover { - background-color: var(--color-white); + background-color: var(--syntax-js-color-white); } .custom-scroll-bars::-webkit-scrollbar-thumb:active { - background-color: var(--color-lighter-gray); + background-color: var(--syntax-js-color-lighter-gray); }/*# sourceMappingURL=syntax.js.css.map */ \ No newline at end of file diff --git a/dist/syntax.js.min.css b/dist/syntax.js.min.css index ec54c4f..ae13183 100644 --- a/dist/syntax.js.min.css +++ b/dist/syntax.js.min.css @@ -1,2 +1,2 @@ -/* Syntax.js v2.3.1 | (c) Bunoon | MIT License */ -:root{--color-keyword:#A71500;--color-value:#F28C28;--color-attribute:#730dd9;--color-keyword-hover:red;--color-value-hover:#FFAC1C;--color-attribute-hover:#a656f5;--color-comment:#78b13f;--color-multi-line-comment:var(--color-comment);--color-string:#484dd2;--color-multi-line-string:var(--color-string);--color-black:#3b3a3a;--color-white:#F5F5F5;--color-dark-gray:gray;--color-gray:#BBB;--color-lighter-gray:silver;--container-background-color:#e8e6e6;--container-border-color:var(--color-black);--container-syntax-background-color:#EEE;--container-syntax-border-color:#CCC;--container-numbers-background-color:#ddd;--container-numbers-border-color:var(--color-gray);--container-description-background-color:var(--container-numbers-background-color);--container-description-border-color:var(--container-numbers-border-color);--tab-background-color:var(--color-white);--tab-text-color:var(--color-black);--tab-border-color:var(--color-black);--tab-active-background-color:var(--color-black);--tab-active-text-color:var(--color-white);--tab-active-border-color:var(--color-black);--tab-hover-background-color:var(--container-numbers-background-color);--tab-hover-text-color:var(--color-black);--tab-hover-border-color:var(--color-black);--button-background-color:var(--color-black);--button-text-color:var(--color-white);--button-hover-background-color:var(--color-dark-gray);--button-hover-text-color:var(--color-white);--border-radius:.5rem;--border-style-scrollbar:inset 0 0 6px var(--color-dark-gray);--border-size:.5px;--transition:all .3s}code.syntax-highlight,div.syntax-highlight{font-family:"Montserrat",sans-serif;font-size:.8rem}code.syntax-highlight div.code,div.syntax-highlight div.code{background-color:var(--container-background-color);border-radius:var(--border-radius);padding:15px;overflow-x:auto;overflow-y:hidden;position:relative;border:var(--border-size) solid var(--container-border-color);color:var(--color-black)}code.syntax-highlight div.code div.tabs,div.syntax-highlight div.code div.tabs{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;text-wrap:nowrap;margin-bottom:10px}code.syntax-highlight div.code div.tabs button.tab,code.syntax-highlight div.code div.tabs button.tab-active,div.syntax-highlight div.code div.tabs button.tab,div.syntax-highlight div.code div.tabs button.tab-active{display:inline-block;padding:10px;padding-left:15px;padding-right:15px;border-radius:var(--border-radius);margin:0!important;margin-right:10px!important;cursor:default;outline:none!important}code.syntax-highlight div.code div.tabs button.tab:last-child,code.syntax-highlight div.code div.tabs button.tab-active:last-child,div.syntax-highlight div.code div.tabs button.tab:last-child,div.syntax-highlight div.code div.tabs button.tab-active:last-child{margin-right:0}code.syntax-highlight div.code div.tabs button.tab,div.syntax-highlight div.code div.tabs button.tab{background-color:var(--tab-background-color);color:var(--tab-text-color);border:var(--border-size) solid var(--tab-border-color)}code.syntax-highlight div.code div.tabs button.tab:hover,div.syntax-highlight div.code div.tabs button.tab:hover{cursor:pointer;background-color:var(--tab-hover-background-color);color:var(--tab-hover-text-color);border:var(--border-size) solid var(--tab-hover-border-color);transition:var(--transition)}code.syntax-highlight div.code div.tabs button.tab-active,div.syntax-highlight div.code div.tabs button.tab-active{background-color:var(--tab-active-background-color);color:var(--tab-active-text-color);border:var(--border-size) solid var(--tab-active-border-color);font-weight:700}code.syntax-highlight div.code div.tab-contents,div.syntax-highlight div.code div.tab-contents{display:flex;width:100%}code.syntax-highlight div.code div.tab-contents pre,div.syntax-highlight div.code div.tab-contents pre{margin:0!important}code.syntax-highlight div.code div.tab-contents div.description,div.syntax-highlight div.code div.tab-contents div.description{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;margin-right:15px;background-color:var(--container-description-background-color);padding:10px;padding-left:15px;padding-right:15px;border-radius:var(--border-radius);text-align:left;border:var(--border-size) solid var(--container-description-border-color);color:var(--color-black);width:150px;display:none}@media (min-width:768px){code.syntax-highlight div.code div.tab-contents div.description,div.syntax-highlight div.code div.tab-contents div.description{display:block}}code.syntax-highlight div.code div.tab-contents div.numbers,div.syntax-highlight div.code div.tab-contents div.numbers{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;margin-right:15px;background-color:var(--container-numbers-background-color);padding:10px;padding-left:15px;padding-right:15px;border-radius:var(--border-radius);text-align:right;font-weight:800!important;border:var(--border-size) solid var(--container-numbers-border-color);display:none}code.syntax-highlight div.code div.tab-contents div.numbers p,div.syntax-highlight div.code div.tab-contents div.numbers p{margin:0;text-wrap:nowrap;color:var(--color-black)}@media (min-width:768px){code.syntax-highlight div.code div.tab-contents div.numbers,div.syntax-highlight div.code div.tab-contents div.numbers{display:block}}code.syntax-highlight div.code div.tab-contents div.syntax,div.syntax-highlight div.code div.tab-contents div.syntax{flex-grow:1;padding:10px;border-radius:var(--border-radius);background-color:var(--container-syntax-background-color);border:var(--border-size) solid var(--container-syntax-border-color);position:relative;overflow:hidden}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;position:absolute;top:0;right:0;text-wrap:nowrap;display:flex}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button,code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label{color:var(--button-text-color);background-color:var(--button-background-color);padding:7px;padding-left:10px;padding-right:10px;display:inline-block;border:none;border-right:1px dotted var(--color-gray);font-size:small;margin:0!important;outline:none!important}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:first-child,code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:first-child,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:first-child,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:first-child{border-bottom-left-radius:var(--border-radius)}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:last-child,code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:last-child,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:last-child,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:last-child{border-top-right-radius:var(--border-radius);border-right:none}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button-opener,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button-opener{font-weight:900!important}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label{cursor:default;color:var(--color-gray);font-weight:700;flex:1}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:hover,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:hover{cursor:pointer;background-color:var(--button-hover-background-color);color:var(--button-hover-text-color);transition:var(--transition)}code.syntax-highlight div.code div.tab-contents div.syntax p,div.syntax-highlight div.code div.tab-contents div.syntax p{margin:0;text-wrap:initial;color:var(--color-black)}@media (min-width:768px){code.syntax-highlight div.code div.tab-contents div.syntax p,div.syntax-highlight div.code div.tab-contents div.syntax p{text-wrap:nowrap}}code.syntax-highlight div.code div.tab-contents div.syntax p span.keyword,code.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable,div.syntax-highlight div.code div.tab-contents div.syntax p span.keyword,div.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable{font-weight:700;color:var(--color-keyword)}code.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable:hover,code.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-keyword-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-keyword-clickable:hover{color:var(--color-keyword-hover);transition:var(--transition);cursor:pointer}code.syntax-highlight div.code div.tab-contents div.syntax p span.value,code.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable,div.syntax-highlight div.code div.tab-contents div.syntax p span.value,div.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable{font-weight:700;color:var(--color-value)}code.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable:hover,code.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-value-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-value-clickable:hover{color:var(--color-value-hover);transition:var(--transition);cursor:pointer}code.syntax-highlight div.code div.tab-contents div.syntax p span.attribute,code.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable,div.syntax-highlight div.code div.tab-contents div.syntax p span.attribute,div.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable{font-weight:700;color:var(--color-attribute)}code.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable:hover,code.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-attribute-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-attribute-clickable:hover{color:var(--color-attribute-hover);transition:var(--transition);cursor:pointer}code.syntax-highlight div.code div.tab-contents div.syntax p span.comment,div.syntax-highlight div.code div.tab-contents div.syntax p span.comment{font-style:italic;color:var(--color-comment)}code.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-comment,div.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-comment{font-style:italic;color:var(--color-multi-line-comment)}code.syntax-highlight div.code div.tab-contents div.syntax p span.string,div.syntax-highlight div.code div.tab-contents div.syntax p span.string{color:var(--color-string)}code.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-string,div.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-string{color:var(--color-multi-line-string)}.custom-scroll-bars::-webkit-scrollbar{width:12px}.custom-scroll-bars::-webkit-scrollbar-track{-webkit-box-shadow:var(--border-style-scrollbar);box-shadow:var(--border-style-scrollbar)}.custom-scroll-bars::-webkit-scrollbar-thumb{-webkit-box-shadow:var(--border-style-scrollbar);box-shadow:var(--border-style-scrollbar);background:var(--color-white)}.custom-scroll-bars::-webkit-scrollbar-thumb:hover{background-color:var(--color-white)}.custom-scroll-bars::-webkit-scrollbar-thumb:active{background-color:var(--color-lighter-gray)} \ No newline at end of file +/* Syntax.js v2.4.0 | (c) Bunoon | MIT License */ +:root{--syntax-js-color-keyword:#A71500;--syntax-js-color-value:#F28C28;--syntax-js-color-attribute:#730dd9;--syntax-js-color-keyword-hover:red;--syntax-js-color-value-hover:#FFAC1C;--syntax-js-color-attribute-hover:#a656f5;--syntax-js-color-comment:#78b13f;--syntax-js-color-multi-line-comment:var(--syntax-js-color-comment);--syntax-js-color-string:#484dd2;--syntax-js-color-multi-line-string:var(--syntax-js-color-string);--syntax-js-color-black:#3b3a3a;--syntax-js-color-white:#F5F5F5;--syntax-js-color-dark-gray:gray;--syntax-js-color-gray:#BBB;--syntax-js-color-lighter-gray:silver;--syntax-js-container-background-color:#e8e6e6;--syntax-js-container-border-color:var(--syntax-js-color-black);--syntax-js-container-syntax-background-color:#EEE;--syntax-js-container-syntax-border-color:#CCC;--syntax-js-container-numbers-background-color:#ddd;--syntax-js-container-numbers-border-color:var(--syntax-js-color-gray);--syntax-js-container-description-background-color:var(--syntax-js-container-numbers-background-color);--syntax-js-container-description-border-color:var(--syntax-js-container-numbers-border-color);--syntax-js-tab-background-color:var(--syntax-js-color-white);--syntax-js-tab-text-color:var(--syntax-js-color-black);--syntax-js-tab-border-color:var(--syntax-js-color-black);--syntax-js-tab-active-background-color:var(--syntax-js-color-black);--syntax-js-tab-active-text-color:var(--syntax-js-color-white);--syntax-js-tab-active-border-color:var(--syntax-js-color-black);--syntax-js-tab-hover-background-color:var(--syntax-js-container-numbers-background-color);--syntax-js-tab-hover-text-color:var(--syntax-js-color-black);--syntax-js-tab-hover-border-color:var(--syntax-js-color-black);--syntax-js-button-background-color:var(--syntax-js-color-black);--syntax-js-button-text-color:var(--syntax-js-color-white);--syntax-js-button-hover-background-color:var(--syntax-js-color-dark-gray);--syntax-js-button-hover-text-color:var(--syntax-js-color-white);--syntax-js-border-radius:.5rem;--syntax-js-border-style-scrollbar:inset 0 0 6px var(--syntax-js-color-dark-gray);--syntax-js-border-size:.5px;--syntax-js-transition:all .3s}code.syntax-highlight,div.syntax-highlight{font-family:"Montserrat",sans-serif;font-size:.8rem}code.syntax-highlight div.code,div.syntax-highlight div.code{background-color:var(--syntax-js-container-background-color);border-radius:var(--syntax-js-border-radius);padding:15px;overflow-x:auto;overflow-y:hidden;position:relative;border:var(--syntax-js-border-size) solid var(--syntax-js-container-border-color);color:var(--syntax-js-color-black)}code.syntax-highlight div.code div.tabs,div.syntax-highlight div.code div.tabs{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;text-wrap:nowrap;margin-bottom:10px}code.syntax-highlight div.code div.tabs button.tab,code.syntax-highlight div.code div.tabs button.tab-active,div.syntax-highlight div.code div.tabs button.tab,div.syntax-highlight div.code div.tabs button.tab-active{display:inline-block;padding:10px;padding-left:15px;padding-right:15px;border-radius:var(--syntax-js-border-radius);margin:0!important;margin-right:10px!important;cursor:default;outline:none!important}code.syntax-highlight div.code div.tabs button.tab:last-child,code.syntax-highlight div.code div.tabs button.tab-active:last-child,div.syntax-highlight div.code div.tabs button.tab:last-child,div.syntax-highlight div.code div.tabs button.tab-active:last-child{margin-right:0}code.syntax-highlight div.code div.tabs button.tab,div.syntax-highlight div.code div.tabs button.tab{background-color:var(--syntax-js-tab-background-color);color:var(--syntax-js-tab-text-color);border:var(--syntax-js-border-size) solid var(--syntax-js-tab-border-color)}code.syntax-highlight div.code div.tabs button.tab:hover,div.syntax-highlight div.code div.tabs button.tab:hover{cursor:pointer;background-color:var(--syntax-js-tab-hover-background-color);color:var(--syntax-js-tab-hover-text-color);border:var(--syntax-js-border-size) solid var(--syntax-js-tab-hover-border-color);transition:var(--syntax-js-transition)}code.syntax-highlight div.code div.tabs button.tab-active,div.syntax-highlight div.code div.tabs button.tab-active{background-color:var(--syntax-js-tab-active-background-color);color:var(--syntax-js-tab-active-text-color);border:var(--syntax-js-border-size) solid var(--syntax-js-tab-active-border-color);font-weight:700}code.syntax-highlight div.code div.tab-contents,div.syntax-highlight div.code div.tab-contents{display:flex;width:100%}code.syntax-highlight div.code div.tab-contents pre,div.syntax-highlight div.code div.tab-contents pre{margin:0!important}code.syntax-highlight div.code div.tab-contents div.description,div.syntax-highlight div.code div.tab-contents div.description{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;margin-right:15px;background-color:var(--syntax-js-container-description-background-color);padding:10px;padding-left:15px;padding-right:15px;border-radius:var(--syntax-js-border-radius);text-align:left;border:var(--syntax-js-border-size) solid var(--syntax-js-container-description-border-color);color:var(--syntax-js-color-black);width:150px;display:none}@media (min-width:768px){code.syntax-highlight div.code div.tab-contents div.description,div.syntax-highlight div.code div.tab-contents div.description{display:block}}code.syntax-highlight div.code div.tab-contents div.numbers,div.syntax-highlight div.code div.tab-contents div.numbers{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;margin-right:15px;background-color:var(--syntax-js-container-numbers-background-color);padding:10px;padding-left:15px;padding-right:15px;border-radius:var(--syntax-js-border-radius);text-align:right;font-weight:800!important;border:var(--syntax-js-border-size) solid var(--syntax-js-container-numbers-border-color);display:none}code.syntax-highlight div.code div.tab-contents div.numbers p,div.syntax-highlight div.code div.tab-contents div.numbers p{margin:0;text-wrap:nowrap;color:var(--syntax-js-color-black)}@media (min-width:768px){code.syntax-highlight div.code div.tab-contents div.numbers,div.syntax-highlight div.code div.tab-contents div.numbers{display:block}}code.syntax-highlight div.code div.tab-contents div.syntax,div.syntax-highlight div.code div.tab-contents div.syntax{flex-grow:1;padding:10px;border-radius:var(--syntax-js-border-radius);background-color:var(--syntax-js-container-syntax-background-color);border:var(--syntax-js-border-size) solid var(--syntax-js-container-syntax-border-color);position:relative;overflow:hidden}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:default;position:absolute;top:0;right:0;text-wrap:nowrap;display:flex}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button,code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label{color:var(--syntax-js-button-text-color);background-color:var(--syntax-js-button-background-color);padding:7px;padding-left:10px;padding-right:10px;display:inline-block;border:none;border-right:1px dotted var(--syntax-js-color-gray);font-size:small;margin:0!important;outline:none!important}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:first-child,code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:first-child,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:first-child,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:first-child{border-bottom-left-radius:var(--syntax-js-border-radius)}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:last-child,code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:last-child,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:last-child,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label:last-child{border-top-right-radius:var(--syntax-js-border-radius);border-right:none}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button-opener,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button-opener{font-weight:900!important}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons div.language-label{cursor:default;color:var(--syntax-js-color-gray);font-weight:700;flex:1}code.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:hover,div.syntax-highlight div.code div.tab-contents div.syntax div.buttons button.button:hover{cursor:pointer;background-color:var(--syntax-js-button-hover-background-color);color:var(--syntax-js-button-hover-text-color);transition:var(--syntax-js-transition)}code.syntax-highlight div.code div.tab-contents div.syntax p,div.syntax-highlight div.code div.tab-contents div.syntax p{margin:0;text-wrap:initial;color:var(--syntax-js-color-black)}@media (min-width:768px){code.syntax-highlight div.code div.tab-contents div.syntax p,div.syntax-highlight div.code div.tab-contents div.syntax p{text-wrap:nowrap}}code.syntax-highlight div.code div.tab-contents div.syntax p span.keyword,code.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable,div.syntax-highlight div.code div.tab-contents div.syntax p span.keyword,div.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable{font-weight:700;color:var(--syntax-js-color-keyword)}code.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable:hover,code.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-keyword-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.keyword-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-keyword-clickable:hover{color:var(--syntax-js-color-keyword-hover);transition:var(--syntax-js-transition);cursor:pointer}code.syntax-highlight div.code div.tab-contents div.syntax p span.value,code.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable,div.syntax-highlight div.code div.tab-contents div.syntax p span.value,div.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable{font-weight:700;color:var(--syntax-js-color-value)}code.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable:hover,code.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-value-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.value-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-value-clickable:hover{color:var(--syntax-js-color-value-hover);transition:var(--syntax-js-transition);cursor:pointer}code.syntax-highlight div.code div.tab-contents div.syntax p span.attribute,code.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable,div.syntax-highlight div.code div.tab-contents div.syntax p span.attribute,div.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable{font-weight:700;color:var(--syntax-js-color-attribute)}code.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable:hover,code.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-attribute-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.attribute-clickable:hover,div.syntax-highlight div.code div.tab-contents div.syntax p span.no-highlight-attribute-clickable:hover{color:var(--syntax-js-color-attribute-hover);transition:var(--syntax-js-transition);cursor:pointer}code.syntax-highlight div.code div.tab-contents div.syntax p span.comment,div.syntax-highlight div.code div.tab-contents div.syntax p span.comment{font-style:italic;color:var(--syntax-js-color-comment)}code.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-comment,div.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-comment{font-style:italic;color:var(--syntax-js-color-multi-line-comment)}code.syntax-highlight div.code div.tab-contents div.syntax p span.string,div.syntax-highlight div.code div.tab-contents div.syntax p span.string{color:var(--syntax-js-color-string)}code.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-string,div.syntax-highlight div.code div.tab-contents div.syntax p span.multi-line-string{color:var(--syntax-js-color-multi-line-string)}.custom-scroll-bars::-webkit-scrollbar{width:12px}.custom-scroll-bars::-webkit-scrollbar-track{-webkit-box-shadow:var(--syntax-js-border-style-scrollbar);box-shadow:var(--syntax-js-border-style-scrollbar)}.custom-scroll-bars::-webkit-scrollbar-thumb{-webkit-box-shadow:var(--syntax-js-border-style-scrollbar);box-shadow:var(--syntax-js-border-style-scrollbar);background:var(--syntax-js-color-white)}.custom-scroll-bars::-webkit-scrollbar-thumb:hover{background-color:var(--syntax-js-color-white)}.custom-scroll-bars::-webkit-scrollbar-thumb:active{background-color:var(--syntax-js-color-lighter-gray)} \ No newline at end of file diff --git a/dist/syntax.min.js b/dist/syntax.min.js index 3a28a6e..ef401c9 100644 --- a/dist/syntax.min.js +++ b/dist/syntax.min.js @@ -1,4 +1,4 @@ -/*! Syntax.js v2.3.1 | (c) Bunoon | MIT License */ +/*! Syntax.js v2.4.0 | (c) Bunoon | MIT License */ (function(){function la(){for(var a=r.highlightAllDomElementTypes,b=a.length,c=0;c + + ## Version 2.3.1: - Comments are now italic by default. - Added a new binding custom trigger called "onButtonsClosed", which states an event that should be triggered when the buttons are closed. diff --git a/package.json b/package.json index dc2f4b0..355ab28 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,9 @@ "name": "jsyntax.js", "title": "Syntax.js", "description": "A lightweight, and easy-to-use, JavaScript library for code syntax highlighting!", - "version": "2.3.1", + "version": "2.4.0", "main": "dist/syntax.js", + "homepage": "https://www.william-troup.com/syntax-js/", "author": { "name": "Bunoon" }, diff --git a/src/syntax.js b/src/syntax.js index 73f3001..bcab4c0 100644 --- a/src/syntax.js +++ b/src/syntax.js @@ -4,7 +4,7 @@ * A lightweight, and easy-to-use, JavaScript library for code syntax highlighting! * * @file syntax.js - * @version v2.3.1 + * @version v2.4.0 * @author Bunoon * @license MIT License * @copyright Bunoon 2023 @@ -1704,7 +1704,7 @@ * @returns {string} The version number. */ this.getVersion = function() { - return "2.3.1"; + return "2.4.0"; }; diff --git a/src/syntax.js.scss b/src/syntax.js.scss index edf0140..fb8972e 100644 --- a/src/syntax.js.scss +++ b/src/syntax.js.scss @@ -1,65 +1,65 @@ /* - * Syntax.js Library v2.3.1 + * Syntax.js Library v2.4.0 * * Copyright 2023 Bunoon * Released under the MIT License */ - @import "foundation/styles"; +@import "foundation/styles"; :root { // Colors - --color-keyword: #A71500; - --color-value: #F28C28; - --color-attribute: #730dd9; - --color-keyword-hover: #FF0000; - --color-value-hover: #FFAC1C; - --color-attribute-hover: #a656f5; - --color-comment: #78b13f; - --color-multi-line-comment: var(--color-comment); - --color-string: #484dd2; - --color-multi-line-string: var(--color-string); - --color-black: #3b3a3a; - --color-white: #F5F5F5; - --color-dark-gray: #808080; - --color-gray: #BBBBBB; - --color-lighter-gray: #C0C0C0; + --syntax-js-color-keyword: #A71500; + --syntax-js-color-value: #F28C28; + --syntax-js-color-attribute: #730dd9; + --syntax-js-color-keyword-hover: #FF0000; + --syntax-js-color-value-hover: #FFAC1C; + --syntax-js-color-attribute-hover: #a656f5; + --syntax-js-color-comment: #78b13f; + --syntax-js-color-multi-line-comment: var(--syntax-js-color-comment); + --syntax-js-color-string: #484dd2; + --syntax-js-color-multi-line-string: var(--syntax-js-color-string); + --syntax-js-color-black: #3b3a3a; + --syntax-js-color-white: #F5F5F5; + --syntax-js-color-dark-gray: #808080; + --syntax-js-color-gray: #BBBBBB; + --syntax-js-color-lighter-gray: #C0C0C0; // Containers - --container-background-color: #e8e6e6; - --container-border-color: var(--color-black); - --container-syntax-background-color: #EEEEEE; - --container-syntax-border-color: #CCCCCC; - --container-numbers-background-color: #dddddd; - --container-numbers-border-color: var(--color-gray); - --container-description-background-color: var(--container-numbers-background-color); - --container-description-border-color: var(--container-numbers-border-color); + --syntax-js-container-background-color: #e8e6e6; + --syntax-js-container-border-color: var(--syntax-js-color-black); + --syntax-js-container-syntax-background-color: #EEEEEE; + --syntax-js-container-syntax-border-color: #CCCCCC; + --syntax-js-container-numbers-background-color: #dddddd; + --syntax-js-container-numbers-border-color: var(--syntax-js-color-gray); + --syntax-js-container-description-background-color: var(--syntax-js-container-numbers-background-color); + --syntax-js-container-description-border-color: var(--syntax-js-container-numbers-border-color); // Tabs - --tab-background-color: var(--color-white); - --tab-text-color: var(--color-black); - --tab-border-color: var(--color-black); - --tab-active-background-color: var(--color-black); - --tab-active-text-color: var(--color-white); - --tab-active-border-color: var(--color-black); - --tab-hover-background-color: var(--container-numbers-background-color); - --tab-hover-text-color: var(--color-black); - --tab-hover-border-color: var(--color-black); + --syntax-js-tab-background-color: var(--syntax-js-color-white); + --syntax-js-tab-text-color: var(--syntax-js-color-black); + --syntax-js-tab-border-color: var(--syntax-js-color-black); + --syntax-js-tab-active-background-color: var(--syntax-js-color-black); + --syntax-js-tab-active-text-color: var(--syntax-js-color-white); + --syntax-js-tab-active-border-color: var(--syntax-js-color-black); + --syntax-js-tab-hover-background-color: var(--syntax-js-container-numbers-background-color); + --syntax-js-tab-hover-text-color: var(--syntax-js-color-black); + --syntax-js-tab-hover-border-color: var(--syntax-js-color-black); // Buttons - --button-background-color: var(--color-black); - --button-text-color: var(--color-white); - --button-hover-background-color: var(--color-dark-gray); - --button-hover-text-color: var(--color-white); + --syntax-js-button-background-color: var(--syntax-js-color-black); + --syntax-js-button-text-color: var(--syntax-js-color-white); + --syntax-js-button-hover-background-color: var(--syntax-js-color-dark-gray); + --syntax-js-button-hover-text-color: var(--syntax-js-color-white); // Borders - --border-radius: 0.5rem; - --border-style-scrollbar: inset 0 0 6px var(--color-dark-gray); - --border-size: 0.5px; + --syntax-js-border-radius: 0.5rem; + --syntax-js-border-style-scrollbar: inset 0 0 6px var(--syntax-js-color-dark-gray); + --syntax-js-border-size: 0.5px; // Transitions - --transition: all .3s; + --syntax-js-transition: all .3s; } @@ -75,14 +75,14 @@ div.syntax-highlight { font-size: 0.8rem; div.code { - background-color: var(--container-background-color); - border-radius: var(--border-radius); + background-color: var(--syntax-js-container-background-color); + border-radius: var(--syntax-js-border-radius); padding: 15px; overflow-x: auto; overflow-y: hidden; position: relative; - border: var(--border-size) solid var(--container-border-color); - color: var(--color-black); + border: var(--syntax-js-border-size) solid var(--syntax-js-container-border-color); + color: var(--syntax-js-color-black); div.tabs { @include no-selection-allowed; @@ -95,7 +95,7 @@ div.syntax-highlight { padding: 10px; padding-left: 15px; padding-right: 15px; - border-radius: var(--border-radius); + border-radius: var(--syntax-js-border-radius); margin: 0 !important; margin-right: 10px !important; cursor: default; @@ -107,23 +107,23 @@ div.syntax-highlight { } button.tab { - background-color: var(--tab-background-color); - color: var(--tab-text-color); - border: var(--border-size) solid var(--tab-border-color); + background-color: var(--syntax-js-tab-background-color); + color: var(--syntax-js-tab-text-color); + border: var(--syntax-js-border-size) solid var(--syntax-js-tab-border-color); &:hover { cursor: pointer; - background-color: var(--tab-hover-background-color); - color: var(--tab-hover-text-color); - border: var(--border-size) solid var(--tab-hover-border-color); - transition: var(--transition); + background-color: var(--syntax-js-tab-hover-background-color); + color: var(--syntax-js-tab-hover-text-color); + border: var(--syntax-js-border-size) solid var(--syntax-js-tab-hover-border-color); + transition: var(--syntax-js-transition); } } button.tab-active { - background-color: var(--tab-active-background-color); - color: var(--tab-active-text-color); - border: var(--border-size) solid var(--tab-active-border-color); + background-color: var(--syntax-js-tab-active-background-color); + color: var(--syntax-js-tab-active-text-color); + border: var(--syntax-js-border-size) solid var(--syntax-js-tab-active-border-color); font-weight: 700; } } @@ -139,14 +139,14 @@ div.syntax-highlight { div.description { @include no-selection-allowed; margin-right: 15px; - background-color: var(--container-description-background-color); + background-color: var(--syntax-js-container-description-background-color); padding: 10px; padding-left: 15px; padding-right: 15px; - border-radius: var(--border-radius); + border-radius: var(--syntax-js-border-radius); text-align: left; - border: var(--border-size) solid var(--container-description-border-color); - color: var(--color-black); + border: var(--syntax-js-border-size) solid var(--syntax-js-container-description-border-color); + color: var(--syntax-js-color-black); width: 150px; display: none; @@ -158,20 +158,20 @@ div.syntax-highlight { div.numbers { @include no-selection-allowed; margin-right: 15px; - background-color: var(--container-numbers-background-color); + background-color: var(--syntax-js-container-numbers-background-color); padding: 10px; padding-left: 15px; padding-right: 15px; - border-radius: var(--border-radius); + border-radius: var(--syntax-js-border-radius); text-align: right; font-weight: 800 !important; - border: var(--border-size) solid var(--container-numbers-border-color); + border: var(--syntax-js-border-size) solid var(--syntax-js-container-numbers-border-color); display: none; p { margin: 0; text-wrap: nowrap; - color: var(--color-black); + color: var(--syntax-js-color-black); } @media (min-width: $minimum-width) { @@ -182,9 +182,9 @@ div.syntax-highlight { div.syntax { flex-grow: 1; padding: 10px; - border-radius: var(--border-radius); - background-color: var(--container-syntax-background-color); - border: var(--border-size) solid var(--container-syntax-border-color); + border-radius: var(--syntax-js-border-radius); + background-color: var(--syntax-js-container-syntax-background-color); + border: var(--syntax-js-border-size) solid var(--syntax-js-container-syntax-border-color); position: relative; overflow: hidden; @@ -198,24 +198,24 @@ div.syntax-highlight { button.button, div.language-label { - color: var(--button-text-color); - background-color: var(--button-background-color); + color: var(--syntax-js-button-text-color); + background-color: var(--syntax-js-button-background-color); padding: 7px; padding-left: 10px; padding-right: 10px; display: inline-block; border: none; - border-right: 1px dotted var(--color-gray); + border-right: 1px dotted var(--syntax-js-color-gray); font-size: small; margin: 0 !important; outline: none !important; &:first-child { - border-bottom-left-radius: var(--border-radius); + border-bottom-left-radius: var(--syntax-js-border-radius); } &:last-child { - border-top-right-radius: var(--border-radius); + border-top-right-radius: var(--syntax-js-border-radius); border-right: none; } } @@ -226,23 +226,23 @@ div.syntax-highlight { div.language-label { cursor: default; - color: var(--color-gray); + color: var(--syntax-js-color-gray); font-weight: 700; flex: 1; } button.button:hover { cursor: pointer; - background-color: var(--button-hover-background-color); - color: var(--button-hover-text-color); - transition: var(--transition); + background-color: var(--syntax-js-button-hover-background-color); + color: var(--syntax-js-button-hover-text-color); + transition: var(--syntax-js-transition); } } p { margin: 0; text-wrap: initial; - color: var(--color-black); + color: var(--syntax-js-color-black); @media (min-width: $minimum-width) { text-wrap: nowrap; @@ -251,58 +251,58 @@ div.syntax-highlight { span.keyword, span.keyword-clickable { font-weight: 700; - color: var(--color-keyword); + color: var(--syntax-js-color-keyword); } span.keyword-clickable:hover, span.no-highlight-keyword-clickable:hover { - color: var(--color-keyword-hover); - transition: var(--transition); + color: var(--syntax-js-color-keyword-hover); + transition: var(--syntax-js-transition); cursor: pointer; } span.value, span.value-clickable { font-weight: 700; - color: var(--color-value); + color: var(--syntax-js-color-value); } span.value-clickable:hover, span.no-highlight-value-clickable:hover { - color: var(--color-value-hover); - transition: var(--transition); + color: var(--syntax-js-color-value-hover); + transition: var(--syntax-js-transition); cursor: pointer; } span.attribute, span.attribute-clickable { font-weight: 700; - color: var(--color-attribute); + color: var(--syntax-js-color-attribute); } span.attribute-clickable:hover, span.no-highlight-attribute-clickable:hover { - color: var(--color-attribute-hover); - transition: var(--transition); + color: var(--syntax-js-color-attribute-hover); + transition: var(--syntax-js-transition); cursor: pointer; } span.comment { font-style: italic; - color: var(--color-comment); + color: var(--syntax-js-color-comment); } span.multi-line-comment { font-style: italic; - color: var(--color-multi-line-comment); + color: var(--syntax-js-color-multi-line-comment); } span.string { - color: var(--color-string); + color: var(--syntax-js-color-string); } span.multi-line-string { - color: var(--color-multi-line-string); + color: var(--syntax-js-color-multi-line-string); } } } @@ -323,21 +323,21 @@ div.syntax-highlight { } &::-webkit-scrollbar-track { - -webkit-box-shadow: var(--border-style-scrollbar); - box-shadow: var(--border-style-scrollbar); + -webkit-box-shadow: var(--syntax-js-border-style-scrollbar); + box-shadow: var(--syntax-js-border-style-scrollbar); } &::-webkit-scrollbar-thumb { - -webkit-box-shadow: var(--border-style-scrollbar); - box-shadow: var(--border-style-scrollbar); - background: var(--color-white); + -webkit-box-shadow: var(--syntax-js-border-style-scrollbar); + box-shadow: var(--syntax-js-border-style-scrollbar); + background: var(--syntax-js-color-white); &:hover { - background-color: var(--color-white); + background-color: var(--syntax-js-color-white); } &:active { - background-color: var(--color-lighter-gray); + background-color: var(--syntax-js-color-lighter-gray); } } } \ No newline at end of file diff --git a/syntax.js.nuspec b/syntax.js.nuspec index a1a1774..83dd801 100644 --- a/syntax.js.nuspec +++ b/syntax.js.nuspec @@ -2,11 +2,11 @@ jSyntax.js - 2.3.1 + 2.4.0 Syntax.js A lightweight, and easy-to-use, JavaScript library for code syntax highlighting! William Troup - https://github.com/williamtroup/Syntax.js + https://www.william-troup.com/syntax-js/ README_NUGET.md MIT