diff --git a/doc_src/python_docs_theme/layout.html b/doc_src/python_docs_theme/layout.html
index ec9f29dbb..8cd0b5377 100644
--- a/doc_src/python_docs_theme/layout.html
+++ b/doc_src/python_docs_theme/layout.html
@@ -58,4 +58,58 @@
{% trans sphinx_version=sphinx_version|e %}Created using Sphinx {{ sphinx_version }}.{% endtrans %}
+
+
{% endblock %}
diff --git a/doc_src/python_docs_theme/static/pydoctheme.css b/doc_src/python_docs_theme/static/pydoctheme.css
index 036fa9146..c9109ebaf 100644
--- a/doc_src/python_docs_theme/static/pydoctheme.css
+++ b/doc_src/python_docs_theme/static/pydoctheme.css
@@ -164,6 +164,26 @@ div.body pre {
border: 1px solid #ac9;
}
+div.highlight {
+ /* For the button to be positionable inside us */
+ position: relative;
+}
+
+div.highlight pre {
+ padding: 10px;
+}
+
+pre button {
+ position: absolute;
+ top: 4px;
+ right: 4px;
+ opacity: 0;
+}
+
+div.highlight pre:hover > button {
+ opacity: 1;
+}
+
div.body div.admonition, div.body div.impl-detail {
border-radius: 3px;
}