aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/custom.css
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2022-12-05 11:01:46 +0100
committerValentin Gagarin <valentin.gagarin@tweag.io>2022-12-05 11:01:46 +0100
commit180538672a017488f9c23a4f72da5e5738a7570c (patch)
tree665437a5a27a61c8d0c61e05ec4a8e43771f405a /doc/manual/custom.css
parentca42068bdc26108cfbd9f7db8af03730bc66d13a (diff)
disallow selecting shell prompt in code samples
this is a quick half-fix for command line examples, as discussed discussed in [1]. [1]: https://github.com/NixOS/nix/pull/7389 examples which look like this $ foo bar baz are confusing for Unix shell beginners, because it's hard to discern what is supposed to be entered into the actual command line when the convention of prefixing `$` is not known, as barely any real-world shell looks that way any more. this change prevents selecting the prompt part with the mouse in the HTML representation of the Nix manual. it does not prevent selecting the output part of the shell example. it also does not address that the copy button provided by mdBook takes the entire sample, including the prompts, into the clipboard.
Diffstat (limited to 'doc/manual/custom.css')
-rw-r--r--doc/manual/custom.css4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/manual/custom.css b/doc/manual/custom.css
index 69d48d4a7..b90f5423f 100644
--- a/doc/manual/custom.css
+++ b/doc/manual/custom.css
@@ -5,3 +5,7 @@ h1:not(:first-of-type) {
h2 {
margin-top: 1em;
}
+
+.hljs-meta {
+ user-select: none;
+}