From a987f04d058323c95634691484640145623dc15c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 2 Mar 2021 15:00:39 +0100 Subject: [PATCH] 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 --- _scss/_perldoc.scss | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/_scss/_perldoc.scss b/_scss/_perldoc.scss index c64e6bba6d..ecdeba5366 100755 --- a/_scss/_perldoc.scss +++ b/_scss/_perldoc.scss @@ -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 */