Skip to content

Commit 8a7b8db

Browse files
authored
fix bg color in doc codeblocks (#87)
# Motivation <!-- Why is this change necessary? --> better bg contrast and theme matching # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed - [ ] I have read and agree to the [Contributor License Agreement](../CLA.md)
1 parent 85c254c commit 8a7b8db

File tree

3 files changed

+82
-79
lines changed

3 files changed

+82
-79
lines changed

docs/introduction/overview.mdx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,12 @@ function.set_docstring('new docstring') # set docstring
3333
width="100%"
3434
height="300px"
3535
scrolling="no"
36-
src={`https://www.chadcode.sh/embedded/codemod/?code=${encodeURIComponent(
36+
src={`http://localhost:3000/embedded/codemod/?code=${encodeURIComponent(
3737
intoSnippet
3838
)}`}
39-
className="rounded-md"
40-
style={{
41-
borderRadius: "0.5rem",
42-
borderColor: "rgb(var(--primary-light))",
43-
borderWidth: "1px",
44-
}}
45-
></iframe>
39+
className="rounded-md ring-1 ring-gray-800/50 dark:ring-gray-800/50"
40+
41+
> </iframe>
4642

4743
## Installation
4844

docs/prism.css

Lines changed: 75 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Override font variables */
22
:root {
3-
--font-jetbrains-mono: Menlo, Monaco, "Courier New", monospace !important;
4-
/* --font-jetbrains-mono: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important; */
3+
--font-jetbrains-mono: Menlo, Monaco, "Courier New", monospace !important;
4+
/* --font-jetbrains-mono: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important; */
55
}
66

77
pre[class*="language-"],
@@ -10,161 +10,165 @@ pre,
1010
code,
1111
kbd,
1212
samp {
13-
font-family: Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important;
14-
--font-jetbrains-mono: Consolas, Monaco, "Andale Mono", "Ubuntu Mono",
15-
monospace !important;
16-
font-weight: 500 !important;
13+
font-family: Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important;
14+
--font-jetbrains-mono: Consolas, Monaco, "Andale Mono", "Ubuntu Mono",
15+
monospace !important;
16+
font-weight: 500 !important;
1717
}
1818

1919
pre[class*="language-"] {
20-
font-family: Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important;
21-
font-weight: 500 !important;
22-
text-align: left;
23-
white-space: pre;
24-
word-spacing: normal;
25-
word-break: normal;
26-
word-wrap: normal;
27-
line-height: 1.5;
28-
-moz-tab-size: 4;
29-
-o-tab-size: 4;
30-
tab-size: 4;
31-
-webkit-hyphens: none;
32-
-moz-hyphens: none;
33-
-ms-hyphens: none;
34-
hyphens: none;
20+
font-family: Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important;
21+
font-weight: 500 !important;
22+
text-align: left;
23+
white-space: pre;
24+
word-spacing: normal;
25+
word-break: normal;
26+
word-wrap: normal;
27+
line-height: 1.5;
28+
-moz-tab-size: 4;
29+
-o-tab-size: 4;
30+
tab-size: 4;
31+
-webkit-hyphens: none;
32+
-moz-hyphens: none;
33+
-ms-hyphens: none;
34+
hyphens: none;
3535
}
3636
pre[class*="language-"]::-moz-selection,
3737
pre[class*="language-"] ::-moz-selection,
3838
code[class*="language-"]::-moz-selection,
3939
code[class*="language-"] ::-moz-selection {
40-
text-shadow: none;
41-
background: #362d45;
40+
text-shadow: none;
41+
background: #362d45;
4242
}
4343
pre[class*="language-"]::selection,
4444
pre[class*="language-"] ::selection,
4545
code[class*="language-"]::selection,
4646
code[class*="language-"] ::selection {
47-
text-shadow: none;
48-
background: #362d45;
47+
text-shadow: none;
48+
background: #362d45;
4949
}
5050
@media print {
51-
code[class*="language-"],
52-
pre[class*="language-"] {
53-
text-shadow: none;
54-
}
51+
code[class*="language-"],
52+
pre[class*="language-"] {
53+
text-shadow: none;
54+
}
5555
}
5656
/* Code blocks */
5757
pre[class*="language-"] {
58-
padding: 1em;
59-
margin: 0.5em 0;
60-
overflow: auto;
58+
padding: 1em;
59+
margin: 0.5em 0;
60+
overflow: auto;
6161
}
6262
:not(pre) > code[class*="language-"],
6363
pre[class*="language-"] {
64-
color: white;
64+
color: white;
6565
}
6666
:not(pre) > code[class*="language-"] {
67-
padding: 0.1em;
68-
border-radius: 0.3em;
69-
white-space: normal;
67+
padding: 0.1em;
68+
border-radius: 0.3em;
69+
white-space: normal;
7070
}
7171

7272
.language-python .language-bash {
73-
background-color: #15141b !important;
74-
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important;
75-
font-weight: 600 !important;
76-
font-size: 16px !important;
73+
background-color: #15141b !important;
74+
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important;
75+
font-weight: 600 !important;
76+
font-size: 16px !important;
7777
}
7878

79-
.dark .bg-codeblock {
80-
background-color: #18181b !important;
79+
.dark\:bg-codeblock:is(.dark *) {
80+
background-color: #15141b !important;
81+
}
82+
83+
.dark\:ring-gray-800\/50:is(.dark *) {
84+
--tw-ring-color: #15141b !important;
8185
}
8286

8387
.codeblock-dark {
84-
background-color: #18181b !important;
85-
color: #edecee !important;
86-
font-size: 20px !important;
88+
background-color: #15141b !important;
89+
color: #edecee !important;
90+
font-size: 20px !important;
8791
}
8892

8993
.dark .prose {
90-
color: #edecee !important;
91-
font-size: 16px !important;
94+
color: #edecee !important;
95+
font-size: 16px !important;
9296
}
9397

9498
/* single backticks are orange */
9599
.dark .prose p code {
96-
color: #ffca85 !important;
100+
color: #ffca85 !important;
97101
}
98102
.dark .prose ul code {
99-
color: #ffca85 !important;
103+
color: #ffca85 !important;
100104
}
101105

102106
/* links are purple */
103107
.prose a {
104-
color: #a277ff !important;
108+
color: #a277ff !important;
105109
}
106110

107111
.token.tag {
108-
color: #a277ff !important;
112+
color: #a277ff !important;
109113
}
110114
.token.variable {
111-
color: #a277ff !important;
115+
color: #a277ff !important;
112116
}
113117
.token.keyword {
114-
color: #a277ff !important;
118+
color: #a277ff !important;
115119
}
116120
.token.operator {
117-
color: #a277ff !important;
121+
color: #a277ff !important;
118122
}
119123
.token.attr-name {
120-
color: #a277ff !important;
124+
color: #a277ff !important;
121125
}
122126
.token.punctuation {
123-
color: #a277ff !important;
127+
color: #a277ff !important;
124128
}
125129
.token.constant {
126-
color: #a277ff !important;
130+
color: #a277ff !important;
127131
}
128132
.token.string {
129-
color: #61ffca !important;
133+
color: #61ffca !important;
130134
}
131135
.token.inserted {
132-
color: #61ffca !important;
136+
color: #61ffca !important;
133137
}
134138
.token.changed {
135-
color: #ffca85 !important;
139+
color: #ffca85 !important;
136140
}
137141
.token.function {
138-
color: #ffca85 !important;
142+
color: #ffca85 !important;
139143
}
140144
.token.deleted {
141-
color: #ff6767 !important;
145+
color: #ff6767 !important;
142146
}
143147
.token.builtin {
144-
color: #ffca85 !important;
148+
color: #ffca85 !important;
145149
}
146150
.token.property {
147-
color: #ffca85 !important;
151+
color: #ffca85 !important;
148152
}
149153
.token.comment {
150-
color: #6d6d6d !important;
154+
color: #6d6d6d !important;
151155
}
152156
.token.class-name {
153-
color: #82e2ff !important;
157+
color: #82e2ff !important;
154158
}
155159
.token.important,
156160
.token.bold {
157-
font-weight: bold !important;
161+
font-weight: bold !important;
158162
}
159163
.token.italic {
160-
font-style: italic !important;
164+
font-style: italic !important;
161165
}
162166

163167
.language-bash {
164-
color: #ffca85 !important;
168+
color: #ffca85 !important;
165169
}
166170

167171
.language-bash .token {
168-
color: #ffca85 !important;
169-
font-weight: 700 !important;
172+
color: #ffca85 !important;
173+
font-weight: 700 !important;
170174
}

docs/style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.dark .bg-codeblock {
2+
background-color: #15141b !important;
3+
}

0 commit comments

Comments
 (0)