From 016f6714aeca1bc458848bab291461cee8e9eb09 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Fri, 27 Sep 2024 11:01:33 +0800 Subject: [PATCH] fix: resolve style compatibility issues for the copy button (#31) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复复制按钮在低版本浏览器下的兼容问题。 可测试插件:[plugin-highlightjs-1.0.0-SNAPSHOT.jar.zip](https://github.com/user-attachments/files/17146103/plugin-highlightjs-1.0.0-SNAPSHOT.jar.zip) Fixes #18 Fixes #17 /kind bug ```release-note 修复复制按钮在低版本浏览器下的兼容问题。 ``` --- src/main/resources/static/plugins/highlightjs-copy.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/static/plugins/highlightjs-copy.css b/src/main/resources/static/plugins/highlightjs-copy.css index cd3a93f..c137a0b 100644 --- a/src/main/resources/static/plugins/highlightjs-copy.css +++ b/src/main/resources/static/plugins/highlightjs-copy.css @@ -34,6 +34,10 @@ mask-repeat: no-repeat; mask-size: 1rem; mask-position: center center; + -webkit-mask: url('data:image/svg+xml;utf-8,'); + -webkit-mask-repeat: no-repeat; + -webkit-mask-size: 1rem; + -webkit-mask-position: center center; } .hljs-copy-button:hover { background-color: color-mix(in srgb, var(--hljs-theme-color), transparent 90%);