From e5915a85a6a5955f7aa7fa5ad208ccdd2a998f68 Mon Sep 17 00:00:00 2001 From: Rami Yushuvaev Date: Sat, 25 Feb 2023 19:11:36 +0200 Subject: [PATCH] fix(theme-default): headings anchor should not be selectable (#3063) Currently, when users select the page content to copy & paste the text, it also selects the headings # anchors. This PR removes the headings anchor-selection by defining the anchors as not selectable (user-select: none;). --- packages/@vuepress/theme-default/styles/index.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@vuepress/theme-default/styles/index.styl b/packages/@vuepress/theme-default/styles/index.styl index 1b34f6022a..a09b0abe89 100644 --- a/packages/@vuepress/theme-default/styles/index.styl +++ b/packages/@vuepress/theme-default/styles/index.styl @@ -146,6 +146,7 @@ a.header-anchor margin-left -0.87em padding-right 0.23em margin-top 0.125em + user-select none opacity 0 &:focus,