Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8b3ec0b

Browse files
committed
Refactor version change colours into variables, also use for refcounts
1 parentade62ae commit8b3ec0b

File tree

2 files changed

+31
-18
lines changed

2 files changed

+31
-18
lines changed

‎python_docs_theme/static/pydoctheme.css

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
@importurl('classic.css');
22

3+
/* Common colours */
4+
:root {
5+
--good-color:rgb(4110051);
6+
--good-border:rgb(79196100);
7+
--middle-color:rgb(1337238);
8+
--middle-border:rgb(244,227,76);
9+
--bad-color:rgb(1594951);
10+
--bad-border:rgb(244,76,78);
11+
}
12+
313
/* unset some styles from the classic stylesheet */
414
div.document,
515
div.body,
@@ -325,8 +335,8 @@ div.footer a:hover {
325335

326336
/* C API return value annotations */
327337
:root {
328-
--refcount:#060;
329-
--refcount-return-borrowed-ref:rgb(1337238);
338+
--refcount:var(--good-color);
339+
--refcount-return-borrowed-ref:var(--middle-color);
330340
}
331341

332342
.refcount {
@@ -635,13 +645,13 @@ div.genindex-jumpbox a {
635645

636646
/* Version change directives */
637647
:root {
638-
--versionadded:rgb(4110051);
639-
--versionchanged:rgb(1337238);
640-
--deprecated:rgb(1594951);
648+
--versionadded:var(--good-color);
649+
--versionchanged:var(--middle-color);
650+
--deprecated:var(--bad-color);
641651

642-
--versionadded-border:rgb(79196100);
643-
--versionchanged-border:rgb(244,227,76);
644-
--deprecated-border:rgb(244,76,78);
652+
--versionadded-border:var(--good-border);
653+
--versionchanged-border:var(--middle-border);
654+
--deprecated-border:var(--bad-border);
645655
}
646656

647657
div.versionadded,

‎python_docs_theme/static/pydoctheme_dark.css

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/* Common colours */
2+
:root {
3+
--good-color:rgb(79196100);
4+
--good-border:var(--good-color);
5+
--middle-color:rgb(244,227,76);
6+
--middle-border:var(--middle-color);
7+
--bad-color:rgb(244,76,78);
8+
--bad-border:var(--bad-color);
9+
}
10+
111

212
/* Browser elements */
313
:root {
@@ -79,13 +89,6 @@ table.docutils th {
7989
background-color:#424242;
8090
}
8191

82-
/* C API return value annotations */
83-
84-
:root {
85-
--refcount:#afa;
86-
--refcount-return-borrowed-ref:rgb(244,227,76);
87-
}
88-
8992
.stableabi {
9093
color:#bbf;
9194
}
@@ -146,7 +149,7 @@ img.invert-in-dark-mode {
146149

147150
/* Version change directives */
148151
:root {
149-
--versionadded:rgb(79196100);
150-
--versionchanged:rgb(244,227,76);
151-
--deprecated:rgb(244,76,78);
152+
--versionadded:var(--good-color);
153+
--versionchanged:var(--middle-color);
154+
--deprecated:var(--bad-color);
152155
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp