Skip to content

Commit ee85f3f

Browse files
committed
CSS: update default styles
I took the time to review all the themes listed in https://readthedocs-addons.readthedocs.io/ and I added the modifications required to make them to look exactly as they were before. I also opened two issues that I found while doing this, but they are unrelated to this particular change: * #588 * #589 Closes #586
1 parent 7235d6b commit ee85f3f

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

src/defaults.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,23 @@
66
}
77

88
:root[data-readthedocs-tool="mkdocs-material"] {
9-
--readthedocs-font-size: 0.58rem;
9+
--readthedocs-font-size: 1.455em;
1010
}
1111

1212
:root[data-readthedocs-tool="antora"] {
13-
--readthedocs-font-size: 0.7rem;
13+
--readthedocs-flyout-font-size: 0.7em;
14+
--readthedocs-notification-font-size: 0.75em;
1415
}
1516

1617
:root[data-readthedocs-tool="mdbook"] {
1718
--readthedocs-font-size: 1.3rem;
1819
}
1920

2021
:root[data-readthedocs-tool="sphinx"][data-readthedocs-tool-theme="furo"] {
21-
--readthedocs-font-size: 0.725rem;
22+
--readthedocs-font-size: 0.9em;
2223
}
2324

2425
:root[data-readthedocs-tool="sphinx"][data-readthedocs-tool-theme="immaterial"] {
25-
--readthedocs-font-size: 0.58rem;
26+
--readthedocs-font-size: 1.45em;
2627
}
2728
}

src/notification.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
@layer defaults {
22
:root {
3-
--readthedocs-notification-font-size: var(--readthedocs-font-size);
4-
--readthedocs-notification-font-family: var(--readthedocs-font-family);
5-
6-
--readthedocs-notification-toast-font-size: calc(
7-
var(--readthedocs-notification-font-size) * 0.85
3+
--readthedocs-notification-font-size: calc(
4+
var(--readthedocs-font-size) * 0.85
85
);
6+
--readthedocs-notification-font-family: var(--readthedocs-font-family);
97

108
--readthedocs-notification-color: rgb(64, 64, 64);
119
--readthedocs-notification-background-color: rgb(234, 234, 234);
@@ -51,7 +49,6 @@
5149
top: 2rem;
5250
right: 2rem;
5351
z-index: 1750;
54-
font-size: var(--readthedocs-notification-toast-font-size);
5552
width: 35rem;
5653
max-width: calc(100vw - 4rem);
5754
}
@@ -114,7 +111,6 @@
114111
}
115112
:host > div > div.content {
116113
line-height: 1em;
117-
font-size: 0.85em;
118114
padding: 0 1.5em;
119115
}
120116

0 commit comments

Comments
 (0)