Skip to content

Commit 6ca31ae

Browse files
committed
style: update background color
1 parent d6252ff commit 6ca31ae

File tree

2 files changed

+44
-5
lines changed

2 files changed

+44
-5
lines changed

docs-en/stylesheets/extra.css

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
1+
:root {
2+
--example-block-bg: #f5f5f5;
3+
--pre-bg: #f5f5f5;
4+
}
5+
6+
[data-md-color-scheme="default"] {
7+
--example-block-bg: #f5f5f5;
8+
--pre-bg: #f5f5f5;
9+
}
10+
11+
[data-md-color-scheme="slate"] {
12+
--example-block-bg: #272a35; /* dark theme background */
13+
--pre-bg: #272a35; /* dark theme background */
14+
}
15+
116
.md-typeset h1 {
217
margin: 0;
318
}
419
.md-typeset h2 {
520
margin: 0.5em 0 0;
621
}
22+
.md-typeset .example-block {
23+
overflow-x: auto;
24+
padding: 0 .2941176471em;
25+
background-color: var(--example-block-bg);
26+
border-radius: .1rem;
27+
}
28+
.md-typeset .example-block p {
29+
margin: 0;
30+
}
731
.md-content__inner>pre {
832
margin: 0;
933
overflow-x: auto;
1034
padding: 0 .2941176471em;
11-
background-color: #f5f5f5;
35+
background-color: var(--pre-bg);
1236
border-radius: .1rem;
1337
}

docs/stylesheets/extra.css

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
1+
:root {
2+
--example-block-bg: #f5f5f5;
3+
--pre-bg: #f5f5f5;
4+
}
5+
6+
[data-md-color-scheme="default"] {
7+
--example-block-bg: #f5f5f5;
8+
--pre-bg: #f5f5f5;
9+
}
10+
11+
[data-md-color-scheme="slate"] {
12+
--example-block-bg: #272a35; /* dark theme background */
13+
--pre-bg: #272a35; /* dark theme background */
14+
}
15+
116
.md-typeset h1 {
2-
margin: 0 0 0em;
17+
margin: 0;
318
}
419
.md-typeset h2 {
5-
margin: 0.5em 0 0em;
20+
margin: 0.5em 0 0;
621
}
722
.md-typeset .example-block {
823
overflow-x: auto;
924
padding: 0 .2941176471em;
10-
background-color: #f5f5f5;
25+
background-color: var(--example-block-bg);
1126
border-radius: .1rem;
1227
}
1328
.md-typeset .example-block p {
@@ -17,6 +32,6 @@
1732
margin: 0;
1833
overflow-x: auto;
1934
padding: 0 .2941176471em;
20-
background-color: #f5f5f5;
35+
background-color: var(--pre-bg);
2136
border-radius: .1rem;
2237
}

0 commit comments

Comments
 (0)