Skip to content

Commit

Permalink
🎨 Colorize the "important" admonition blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Sep 5, 2020
1 parent 89fbc18 commit 43026db
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Expand Up @@ -22,7 +22,7 @@ exclude noxfile.py

recursive-include src/pip/_vendor *.pem
recursive-include src/pip/_vendor py.typed
recursive-include docs Makefile *.rst *.py *.bat
recursive-include docs *.css *.rst *.py

exclude src/pip/_vendor/six
exclude src/pip/_vendor/six/moves
Expand Down
1 change: 1 addition & 0 deletions docs/docs_feedback_sphinxext.py
Expand Up @@ -87,6 +87,7 @@ def setup(app: Sphinx) -> Dict[str, Union[bool, str]]:
This function adds a callback for modifying the document sources
in-place on read.
"""
app.add_css_file('important-admonition.css')
app.connect('source-read', _modify_rst_document_source_on_read)

return {
Expand Down
8 changes: 8 additions & 0 deletions docs/html/_static/important-admonition.css
@@ -0,0 +1,8 @@
.admonition.important {
background-color: rgb(219, 250, 244);
}

.admonition.important>.admonition-title {
border: 1px solid rgb(26, 188, 156);
color: rgb(26, 188, 156);
}
2 changes: 1 addition & 1 deletion docs/html/conf.py
Expand Up @@ -174,7 +174,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []
html_static_path = ['_static']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down

0 comments on commit 43026db

Please sign in to comment.