-
Notifications
You must be signed in to change notification settings - Fork 499
Description
I'm currently working on ANSI color support for the @example/@repl blocks. (cf. PR #1441) I would like to support LaTex output in the future, but I'm targeting HTML first.
There are several ways to specify ANSI colors, of which the terminal-dependent 16 colors are the most commonly used. Since those colors are not standardized, I'm going to style them based on the colors (variables) of the theme, rather than hard-coding the color codes. Consequently, I'm planning to change the default theme slightly.
By contrast, in terms of thematic consistency, I have two gripes with the syntax-highlighting with highlight.js. One is that the color scheme of the dark theme (a11y-dark) doesn't match the rest of the documenter-dark theme, and the other is that there is no consistency between the dark theme and the light theme (highlight.jl's default).
Additionally, @fredrikekre has greatly improved Julia's syntax highlighting. So, I see it as an opportunity to reconsider the themes.
Although I haven't decided on a specific theme selection and design approach yet, here's a demo of the new highlight.js.

example dark theme
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #282f2f;
}
.hljs,
.hljs-params {
color: #f0f8f8;
}
.hljs-formula,
.hljs-keyword,
.hljs-link,
.hljs-selector-tag {
color: #be7dda;
}
.hljs-class,
.hljs-name,
.hljs-quote,
.hljs-title,
.hljs-variable {
color: #b5ddd4
}
.hljs-built_in,
.hljs-builtin-name,
.hljs-bullet,
.hljs-doctag,
.hljs-emphasis,
.hljs-strong {
color: #9baae5;
}
.hljs-template-tag,
.hljs-type {
color: #1db5c9;
}
.hljs-code,
.hljs-meta,
.hljs-regexp,
.hljs-symbol,
.hljs-selector-id,
.hljs-tag {
color: #1abc9c;
}
.hljs-addition,
.hljs-meta-string,
.hljs-section,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-string {
color: #6cbe5e;
}
.hljs-attr,
.hljs-attribute,
.hljs-function,
.hljs-meta-keyword,
.hljs-selector-pseudo {
color: #c3de84;
}
.hljs-comment {
color: #9b9891;
}
.hljs-link_label,
.hljs-literal,
.hljs-number {
color: #dab426;
}
.hljs-deletion,
.hljs-subst,
.hljs-template-variable {
color: #ff8873;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-section,
.hljs-strong {
font-weight: bolder;
}