Skip to content

Commit 0f28712

Browse files
author
William Troup
committed
Added a new ":root" variable called "--syntax-js-default-font" (specifies the default font).
1 parent f5581d9 commit 0f28712

5 files changed

Lines changed: 9 additions & 4 deletions

File tree

dist/syntax.js.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Released under the MIT License
66
*/
77
:root {
8+
--syntax-js-default-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
89
--syntax-js-color-keyword: #A71500;
910
--syntax-js-color-value: #F28C28;
1011
--syntax-js-color-attribute: #730dd9;
@@ -54,7 +55,7 @@
5455
*/
5556
code.syntax-highlight,
5657
div.syntax-highlight {
57-
font-family: "Montserrat", sans-serif;
58+
font-family: var(--syntax-js-default-font);
5859
font-size: 0.8rem;
5960
}
6061
code.syntax-highlight div.code,

dist/syntax.js.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/syntax.js.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/CHANGE_LOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Version 2.4.2:
44
- All hover transition effects now work for hovering, and not hovering, which results in a smoother display.
55
- Minor updates to the documentation.
6+
- Added a new ":root" variable called "--syntax-js-default-font" (specifies the default font).
67

78
<br>
89

src/syntax.js.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
@import "foundation/styles";
1010

1111
:root {
12+
// Fonts
13+
--syntax-js-default-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
14+
1215
// Colors
1316
--syntax-js-color-keyword: #A71500;
1417
--syntax-js-color-value: #F28C28;
@@ -71,7 +74,7 @@
7174

7275
code.syntax-highlight,
7376
div.syntax-highlight {
74-
font-family: 'Montserrat', sans-serif;
77+
font-family: var(--syntax-js-default-font);
7578
font-size: 0.8rem;
7679

7780
div.code {

0 commit comments

Comments
 (0)