Skip to content

Commit 3ee2a75

Browse files
committed
Use Bootstrap colors in syntax highlighting
1 parent 19d547b commit 3ee2a75

File tree

4 files changed

+28
-26
lines changed

4 files changed

+28
-26
lines changed

site/assets/scss/_clipboard-js.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
padding: .5em;
2424
line-height: 1;
2525
color: var(--bs-body-color);
26-
background-color: var(--bs-tertiary-bg);
26+
background-color: var(--bd-pre-bg);
2727
border: 0;
2828
@include border-radius(.25rem);
2929

site/assets/scss/_component-examples.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@
344344
position: relative;
345345
padding: .75rem ($bd-gutter-x * .5);
346346
margin-bottom: 1rem;
347-
background-color: var(--bs-tertiary-bg);
347+
background-color: var(--bd-pre-bg);
348348

349349
@include media-breakpoint-up(md) {
350350
padding: .75rem 1.25rem;
@@ -388,7 +388,7 @@
388388
}
389389

390390
.highlight-toolbar {
391-
background-color: var(--bs-tertiary-bg);
391+
background-color: var(--bd-pre-bg);
392392
border: solid var(--bs-border-color);
393393
border-width: 1px 0;
394394

site/assets/scss/_syntax.scss

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
:root,
22
[data-bs-theme="light"] {
3-
--base00: #fff;
4-
--base01: #f5f5f5;
3+
// --base00: #fff;
4+
// --base01: #f5f5f5;
55
--base02: #c8c8fa;
66
--base03: #565c64;
7-
--base04: #030303;
7+
--base04: #666;
88
--base05: #333;
99
--base06: #fff;
10-
--base07: #9a6700;
11-
--base08: #bc4c00;
12-
--base09: #087990;
13-
--base0A: #795da3;
14-
--base0B: #183691;
15-
--base0C: #183691;
16-
--base0D: #795da3;
17-
--base0E: #a71d5d;
10+
--base07: #{$teal-700}; // #9a6700
11+
--base08: #{mix($red-500, $red-600, 50%)}; // #bc4c00
12+
--base09: #{$cyan-700}; // #087990
13+
--base0A: #{$purple-500}; // #795da3
14+
--base0B: #{$blue-700}; // #183691
15+
--base0C: #{$blue-700}; // #183691
16+
--base0D: #{$purple-500}; // #795da3
17+
--base0E: #{$pink-600}; // #a71d5d
1818
--base0F: #333;
1919
}
2020

2121
@include color-mode(dark, true) {
22-
--base00: #282c34;
23-
--base01: #353b45;
22+
// --base00: #282c34;
23+
// --base01: #353b45;
2424
--base02: #3e4451;
2525
--base03: #868e96;
26-
--base04: #565c64;
26+
--base04: #868e96;
2727
--base05: #abb2bf;
2828
--base06: #b6bdca;
29-
--base07: #d19a66;
30-
--base08: #{$red-300};
31-
--base09: #d19a66;
32-
--base0A: #e5c07b;
33-
--base0B: #98c379;
34-
--base0C: #56b6c2;
35-
--base0D: #61afef;
36-
--base0E: #c678dd;
37-
--base0F: #be5046;
29+
--base07: #{$orange-300}; // #d19a66
30+
--base08: #{$cyan-300};
31+
--base09: #{$orange-300}; // #d19a66
32+
--base0A: #{$yellow-200}; // #e5c07b
33+
--base0B: #{$teal-300}; // #98c379
34+
--base0C: #{$teal-300}; // #56b6c2
35+
--base0D: #{$blue-300}; // #61afef
36+
--base0E: #{$indigo-200}; // #c678dd
37+
--base0F: #{$red-300}; // #be5046
3838
}
3939

4040
.hl { background-color: var(--base02); }

site/assets/scss/_variables.scss

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ $bd-callout-variants: info, warning, danger !default;
2323
--bd-sidebar-link-bg: rgba(var(--bd-violet-rgb), .1);
2424
--bd-callout-link: #{to-rgb($blue-600)};
2525
--bd-callout-code-color: #{$pink-600};
26+
--bd-pre-bg: var(--bs-tertiary-bg);
2627
}
2728

2829
@include color-mode(dark, true) {
@@ -32,4 +33,5 @@ $bd-callout-variants: info, warning, danger !default;
3233
--bd-sidebar-link-bg: rgba(#{to-rgb(mix($bd-violet, $black, 75%))}, .5);
3334
--bd-callout-link: #{to-rgb($blue-300)};
3435
--bd-callout-code-color: #{$pink-300};
36+
--bd-pre-bg: #{adjust-color($gray-900, $lightness: -2.5%)}; // stylelint-disable-line scss/at-function-named-arguments
3537
}

0 commit comments

Comments
 (0)