From 961ebb545b9d790805a3cca8a45a4fcc5c06bf13 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 8 Jul 2021 21:07:31 +0800 Subject: [PATCH] Set the dollar sign of code snippets to non-selectable --- _sass/addon/syntax.scss | 44 +++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/_sass/addon/syntax.scss b/_sass/addon/syntax.scss index 2ad456a..246c1a7 100644 --- a/_sass/addon/syntax.scss +++ b/_sass/addon/syntax.scss @@ -63,6 +63,28 @@ div > pre { } overflow: auto; + + pre { + margin-bottom: 0; + font-size: $code-font-size; + line-height: 1.4rem; + word-wrap: normal; /* Fixed Safari overflow-x */ + } + + table { + padding: 0; + border: 0; + td pre { + overflow: visible; /* Fixed iOS safari overflow-x */ + word-break: normal; /* Fixed iOS safari linenos code break */ + } + } + + td { + padding: 0; + border: 0; + } + .lineno { margin-left: 0.2rem; padding-right: 0.5rem; @@ -77,24 +99,12 @@ div > pre { -o-user-select: none; user-select: none; } - pre { - margin-bottom: 0; - font-size: $code-font-size; - line-height: 1.4rem; - word-wrap: normal; /* Fixed Safari overflow-x */ - } - table { - padding: 0; - border: 0; - td pre { - overflow: visible; /* Fixed iOS safari overflow-x */ - word-break: normal; /* Fixed iOS safari linenos code break */ - } - } - td { - padding: 0; - border: 0; + + /* set the dollar sign to non-selectable */ + .gp { + user-select: none; } + } //.highlight code {