Skip to content

Commit 200a2d9

Browse files
DOC-3881: Revert to Highlight.js, fix admonition issues (#112)
* Add highlight.js bundle to gcx, fix admonition errors with dark mode and nested blocks * update code styles for highlight.js --------- Co-authored-by: Josué Bran <[email protected]>
1 parent 9d47023 commit 200a2d9

File tree

14 files changed

+53
-530
lines changed

14 files changed

+53
-530
lines changed

gcx/gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const cleanCSS = () => {
8888
}
8989

9090
const bundleCSS = () =>
91-
src(['styles/src/css/**/*.css', '!styles/src/css/**/helios-gcx.css', '!styles/src/css/**/highlight.css'])
91+
src(['styles/src/css/**/*.css', '!styles/src/css/**/helios-gcx.css'])
9292
.pipe(concat('siteTemp.css'))
9393
.pipe(dest('styles/build/css'))
9494

gcx/styles/src/css/doc.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,7 @@
520520

521521
.doc pre:not(.highlight),
522522
.doc pre.highlight code {
523-
/* background: var(--pre-background); */
524-
box-shadow: inset 0 0 1.75px var(--pre-border-color);
523+
background: none;
525524
display: block;
526525
overflow-x: auto;
527526
padding: 0.75rem;

gcx/styles/src/css/helios-gcx-alerts.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,6 @@
6969
border-radius: 6px;
7070
}
7171

72-
.dark-mode .doc .admonitionblock.important tr {
73-
display: block;
74-
background: var(--color-white);
75-
border: 2px solid var(--color-gray-neutral-500);
76-
border-radius: 6px;
77-
}
78-
7972
.doc .admonitionblock.important td.content {
8073
color: var(--color-black);
8174
}

gcx/styles/src/css/helios-gcx-code.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@
2121

2222
.doc pre.highlight,
2323
.doc pre:not(.highlight) {
24-
/* background: #f7f8ff; */
24+
background: var(--color-smoke-60);
2525
display: block;
2626
font-size: 14px;
2727
padding: .75rem;
2828
box-shadow: inset 0 0 1.75px #c9cef6;
29+
border: 1px solid var(--color-prism-light-border);
30+
border-radius: .375em;
2931
overflow-x: auto
3032
}
3133

gcx/styles/src/css/helios-gcx-icons.css

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,31 @@
22
padding: 0 1.5rem;;
33
}
44

5-
.doc .admonitionblock.tip .icon,
6-
.doc .admonitionblock.note .icon {
5+
.doc .admonitionblock.tip > table > tbody > tr > .icon,
6+
.doc .admonitionblock.note > table > tbody > tr > .icon {
77
color: var(--color-green-700);
88
background-color: var(--color-green-700);
99
border: 2px solid var(--color-green-700);
1010
}
1111

12-
.doc .admonitionblock.warning .icon {
12+
.doc .admonitionblock.warning > table > tbody > tr > .icon {
1313
color: var(--color-red-500);
1414
background-color: var(--color-red-500);
1515
border: 2px solid var(--color-red-500);
1616
}
1717

18-
.doc .admonitionblock.caution .icon {
18+
.doc .admonitionblock.caution > table > tbody > tr > .icon {
1919
color: #E64328;
2020
background-color: #E64328;
2121
border: 2px solid #E64328;
2222
}
2323

24-
.doc .admonitionblock.important .icon {
24+
.doc .admonitionblock.important > table > tbody > tr > .icon {
2525
color: var(--color-gray-neutral-700);
2626
background-color: var(--color-gray-neutral-700);
2727
border: 2px solid var(--color-gray-neutral-700);
2828
}
2929

30-
.dark-mode .doc .admonitionblock.important .icon {
31-
color: var(--color-gray-neutral-500);
32-
background-color: var(--color-gray-neutral-500);
33-
border: 2px solid var(--color-gray-neutral-500);
34-
}
35-
36-
3730
.doc .admonitionblock .icon i::after {
3831
color: white;
3932
}

gcx/styles/src/css/helios-gcx.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,12 @@ feedback-stars {
431431

432432
.doc pre.highlight,
433433
.doc pre:not(.highlight) {
434-
/* background: #f7f8ff; */
434+
background: var(--color-smoke-60);
435435
display: block;
436436
font-size: 14px;
437437
padding: .75rem;
438-
box-shadow: inset 0 0 1.75px #c9cef6;
438+
border: 1px solid var(--color-prism-light-border);
439+
border-radius: .375em;
439440
overflow-x: auto
440441
}
441442

gcx/styles/src/css/highlight.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*! Adapted from the GitHub style by Vasily Polovnyov <[email protected]> */
2-
/* .hljs-comment,
2+
.hljs-comment,
33
.hljs-quote {
44
color: #998;
55
font-style: italic;
@@ -8,7 +8,7 @@
88
.hljs-keyword,
99
.hljs-selector-tag,
1010
.hljs-subst {
11-
color: #333;
11+
color: var(--color-prism-light-purple);
1212
font-weight: var(--monospace-font-weight-bold);
1313
}
1414

@@ -17,7 +17,7 @@
1717
.hljs-variable,
1818
.hljs-template-variable,
1919
.hljs-tag .hljs-attr {
20-
color: #008080;
20+
color: var(--color-prism-light-orange);
2121
}
2222

2323
.hljs-string,
@@ -199,6 +199,12 @@
199199
font-weight: bold;
200200
}
201201

202+
.dark-mode .doc pre.highlight,
203+
.dark-mode .doc pre:not(.highlight) {
204+
background: var(--color-prism-dark-background);
205+
border: 1px solid var(--color-prism-dark-border);
206+
}
207+
202208
pre code.hljs {
203209
display: block;
204210
overflow-x: auto;
@@ -272,7 +278,7 @@ code.hljs {
272278
.hljs-addition,
273279
.hljs-title.class_.inherited__,
274280
.hljs-string {
275-
color: #637200;
281+
color: var(--color-prism-light-orange);
276282
}
277283

278284
.hljs-built_in,

gcx/styles/src/css/prism.css

Lines changed: 0 additions & 190 deletions
This file was deleted.

gcx/styles/src/js/vendor/highlight.js

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

0 commit comments

Comments
 (0)