Skip to content

Commit b883e9f

Browse files
committed
Refactored the code, support for packaging.python.org
1 parent df96162 commit b883e9f

File tree

3 files changed

+37
-38
lines changed

3 files changed

+37
-38
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33

44
## **1.1.0** - Dev
55
### Added
6+
- Support for domain `packaging.python.org`
67
- Support for syntax highlighting compatibility with dark colors
78

89
### Fixed
910
- `css` syntax errors
1011
- Background color for `.note tt`
12+
- Color for variable `--background-gray`
13+
14+
### Changed
15+
- Refactored the `css` stylesheet
16+
- Remade the README file
1117

1218

1319
## **1.0.1** - 2020.11.11

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@
22
<b>Python Docs</b><br>
33
Dark Theme
44
</h1>
5-
<h2 align="center">
6-
<div><code>.user.css</code></div>
7-
<br>
8-
<div>📦 <a href="https://github.com/maximilionus/python_docs_dark/raw/master/python_docs_dark.user.css">INSTALL</a> 📦</div>
9-
</h2>
10-
<br><br>
11-
125
<details align="center">
136
<summary>Preview Image</summary>
147
<img src="./images/preview.jpg">
158
</details>
9+
10+
## About
11+
This repository contains the userstyle dark theme for python documentation and other style-inherited web pages.
12+
13+
## Installation
14+
1. Ensure that **Stylish** extension ([Chrome](https://chrome.google.com/webstore/detail/stylish-custom-themes-for/fjnbnpbmkenffdnngjfgmeleoegfcffe), [Firefox](https://addons.mozilla.org/ru/firefox/addon/stylish/)) is installed in your browser
15+
2. 📦 [Install the usercss](https://github.com/maximilionus/python_docs_dark/raw/master/python_docs_dark.user.css)
16+
17+
## Supported Domains
18+
Here's list of domains that are currenlty supported by this userstyle.
19+
20+
- docs.python.org
21+
- packaging.python.org
22+
23+
> If you know of other domains that inherited the style from docs.python.org, you can notify me via [Issues](https://github.com/maximilionus/python_docs_dark/issues)

python_docs_dark.user.css

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
@description Dark theme for docs.python.org
99
@author maximilionus <[email protected]>
1010
==/UserStyle== */
11-
@-moz-document domain("docs.python.org") {
11+
@-moz-document domain("docs.python.org"), domain("packaging.python.org") {
1212
:root {
1313
--background-dark: #181818;
1414
--background-light: #262626;
15-
--background-gray: #404040;
15+
--background-gray: #303030;
1616
--text-normal: #b5b5b5;
1717
--text-light: #d9d9d9;
1818
--text-code-general: #ddcbb4;
@@ -32,15 +32,13 @@
3232
border-radius: 4px;
3333
}
3434

35-
html {
36-
background: var(--background-dark);
37-
}
38-
39-
body {
40-
background: var(--background-dark);
41-
}
42-
43-
ul {
35+
html,
36+
body,
37+
ul,
38+
div.related,
39+
div.sphinxsidebar,
40+
div.warning,
41+
div.document {
4442
background: var(--background-dark);
4543
}
4644

@@ -53,18 +51,10 @@
5351
color: var(--text-normal);
5452
}
5553

56-
div.related {
57-
background-color: var(--background-dark);
58-
}
59-
6054
div.related a {
6155
color: var(--text-normal);
6256
}
6357

64-
div.sphinxsidebar {
65-
background: var(--background-dark);
66-
}
67-
6858
div.sphinxsidebar h3 a {
6959
color: var(--text-light);
7060
}
@@ -115,10 +105,6 @@
115105
background: var(--background-light);
116106
}
117107

118-
div.warning {
119-
background: var(--background-light);
120-
}
121-
122108
span.pre {
123109
color: var(--text-code-general);
124110
background: var(--background-gray);
@@ -143,14 +129,9 @@
143129
background: var(--background-light);
144130
}
145131

146-
code {
147-
background: var(--background-gray);
148-
}
149-
150-
tt {
151-
background-color: var(--background-gray);
152-
}
153-
132+
code,
133+
tt,
134+
.note code,
154135
.note tt {
155136
background-color: var(--background-gray);
156137
}
@@ -171,6 +152,10 @@
171152
color: #e6572e;
172153
}
173154

155+
.highlight .kn {
156+
color: #2da74f;
157+
}
158+
174159
.highlight .cm {
175160
color: #46a7bf;
176161
}

0 commit comments

Comments
 (0)