highlighting: make comments, prompt and command-output non-selectable

Prevent selecting comments, command-output and command-prompt in shell
examples that use the "console" lexer/highlighter to allow easier copying.
See https://github.com/rouge-ruby/rouge/issues/1023

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-03-02 15:00:39 +01:00
parent 2a84b75739
commit a987f04d05
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 14 additions and 0 deletions

View File

@ -17,6 +17,20 @@
.highlight .gi { color: #00aa00 } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
// Prevent selecting comments, command-output and command-prompt in shell
// examples that use the "console" lexer/highlighter to allow easier copying.
// See https://github.com/rouge-ruby/rouge/issues/1023
.highlight .c,
.highlight .go,
.highlight .gp
{
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
.highlight .gs {} /* Generic.Strong */
.highlight .gu { color: #800080 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */