summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-06-29 15:50:27 -0700
committerGitHub <noreply@github.com>2020-06-29 15:50:27 -0700
commit6c872ef6be79683fb6c8ed456f59432f961d1cc2 (patch)
tree6f129c6dc32bdcc36d1892f875c4ed7f2950614e
parentba028ae62341a11743c8b66d2fd7e1d3eb2fe032 (diff)
parentdc6ede04536523695ce633acae2a7d4dceee8efe (diff)
Merge pull request #3079 from sommersoft/2.x2.x
[2.x] Custom CSS For "Viewing Outdated Docs" Message
-rw-r--r--conf.py3
-rw-r--r--docs/static/customstyle.css13
2 files changed, 16 insertions, 0 deletions
diff --git a/conf.py b/conf.py
index 7353ad038..80eab92bf 100644
--- a/conf.py
+++ b/conf.py
@@ -336,3 +336,6 @@ texinfo_documents = [
intersphinx_mapping = {"cpython": ('https://docs.python.org/3/', None),
"bus_device": ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None),
"register": ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None)}
+def setup(app):
+ app.add_stylesheet("customstyle.css")
+
diff --git a/docs/static/customstyle.css b/docs/static/customstyle.css
index 6c964b762..1136edcd3 100644
--- a/docs/static/customstyle.css
+++ b/docs/static/customstyle.css
@@ -10,6 +10,19 @@
}
+/* custom CSS to sticky the ' viewing outdated version'
+ warning
+*/
+.document > .admonition {
+ position: sticky;
+ top: 0px;
+ background-color: salmon;
+ z-index: 2;
+}
+
+body {
+ overflow-x: unset!important;
+}
/* override table width restrictions */
@media screen and (min-width: 767px) {