summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Volant <arthurvolant@gmail.com>2021-04-15 12:09:27 +0200
committerArthur Volant <arthurvolant@gmail.com>2021-04-17 17:46:23 +0200
commit48afcc4f1e6ead160dae44b9e9320c2b69bfc891 (patch)
tree0ebe1ba28d304fc09251f7b5f17ed174aaaa033b
parent8954770f677994cfb13d93ea6d08b13db5382e31 (diff)
downloadsphinx-git-48afcc4f1e6ead160dae44b9e9320c2b69bfc891.tar.gz
Fix selection for safari/Internet Explorer and Mozilla
-rw-r--r--sphinx/themes/basic/static/basic.css_t12
1 files changed, 8 insertions, 4 deletions
diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t
index 25ab688e4..b80868d7a 100644
--- a/sphinx/themes/basic/static/basic.css_t
+++ b/sphinx/themes/basic/static/basic.css_t
@@ -817,12 +817,16 @@ div.code-block-caption code {
background-color: transparent;
}
-table.highlighttable td.linenos,
-span.linenos,
-div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
- user-select: none;
+/* From https://stackoverflow.com/a/34372191 */
+span.gp { /* gp: Generic.Prompt */
+ user-select: none;
+ -webkit-user-select: text; /* Safari fallback only */
+ -webkit-user-select: none; /* Chrome/Safari */
+ -moz-user-select: none; /* Firefox */
+ -ms-user-select: none; /* IE10+ */
}
+
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;