aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_docgen/priv/css
diff options
context:
space:
mode:
authorMariano Guerra <[email protected]>2016-10-21 21:22:52 +0100
committerMariano Guerra <[email protected]>2017-03-13 11:51:52 +0100
commit2887ebb0cd748f60cfe410f414ad27acfc7a3cb5 (patch)
tree4b1caa1e7aebada7aead827599b3ef80dab148cd /lib/erl_docgen/priv/css
parent1f0689526a75e776bb4486da55cd48cb2e2efb15 (diff)
downloadotp-2887ebb0cd748f60cfe410f414ad27acfc7a3cb5.tar.gz
otp-2887ebb0cd748f60cfe410f414ad27acfc7a3cb5.tar.bz2
otp-2887ebb0cd748f60cfe410f414ad27acfc7a3cb5.zip
add progressive enhanced syntax highlighter
it loads a script at the end of the page that loads the required resources and initializes the syntax highlighter. if js is disabled or blocked nothing happens, the code blocks will display with the style they had until now
Diffstat (limited to 'lib/erl_docgen/priv/css')
-rw-r--r--lib/erl_docgen/priv/css/Makefile3
-rw-r--r--lib/erl_docgen/priv/css/highlight.css96
2 files changed, 98 insertions, 1 deletions
diff --git a/lib/erl_docgen/priv/css/Makefile b/lib/erl_docgen/priv/css/Makefile
index c317411d32..e3d2ee7e3f 100644
--- a/lib/erl_docgen/priv/css/Makefile
+++ b/lib/erl_docgen/priv/css/Makefile
@@ -39,7 +39,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/erl_docgen-$(VSN)
CSS_FILES = \
- otp_doc.css
+ otp_doc.css \
+ highlight.css
# ----------------------------------------------------
diff --git a/lib/erl_docgen/priv/css/highlight.css b/lib/erl_docgen/priv/css/highlight.css
new file mode 100644
index 0000000000..d5bd1d2a9a
--- /dev/null
+++ b/lib/erl_docgen/priv/css/highlight.css
@@ -0,0 +1,96 @@
+/*
+
+Atom One Light by Daniel Gamage
+Original One Light Syntax theme from https://github.com/atom/one-light-syntax
+
+base: #fafafa
+mono-1: #383a42
+mono-2: #686b77
+mono-3: #a0a1a7
+hue-1: #0184bb
+hue-2: #4078f2
+hue-3: #a626a4
+hue-4: #50a14f
+hue-5: #e45649
+hue-5-2: #c91243
+hue-6: #986801
+hue-6-2: #c18401
+
+*/
+
+.hljs {
+ display: block;
+ overflow-x: auto;
+ padding: 0.5em;
+ color: #383a42;
+ background: #fafafa;
+}
+
+.hljs-comment,
+.hljs-quote {
+ color: #a0a1a7;
+ font-style: italic;
+}
+
+.hljs-doctag,
+.hljs-keyword,
+.hljs-formula {
+ color: #a626a4;
+}
+
+.hljs-section,
+.hljs-name,
+.hljs-selector-tag,
+.hljs-deletion,
+.hljs-subst {
+ color: #e45649;
+}
+
+.hljs-literal {
+ color: #0184bb;
+}
+
+.hljs-string,
+.hljs-regexp,
+.hljs-addition,
+.hljs-attribute,
+.hljs-meta-string {
+ color: #50a14f;
+}
+
+.hljs-built_in,
+.hljs-class .hljs-title {
+ color: #c18401;
+}
+
+.hljs-attr,
+.hljs-variable,
+.hljs-template-variable,
+.hljs-type,
+.hljs-selector-class,
+.hljs-selector-attr,
+.hljs-selector-pseudo,
+.hljs-number {
+ color: #986801;
+}
+
+.hljs-symbol,
+.hljs-bullet,
+.hljs-link,
+.hljs-meta,
+.hljs-selector-id,
+.hljs-title {
+ color: #4078f2;
+}
+
+.hljs-emphasis {
+ font-style: italic;
+}
+
+.hljs-strong {
+ font-weight: bold;
+}
+
+.hljs-link {
+ text-decoration: underline;
+}