From 6e7da745af592c8387fe1ed31e64dae6ddc92220 Mon Sep 17 00:00:00 2001 From: ddryo <31400297+ddryo@users.noreply.github.com> Date: Wed, 1 Jul 2026 17:31:05 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Chrome=E3=81=A7=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=83=A9=E3=83=99=E3=83=AB=E3=81=8C=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/loos_hcb.php | 2 +- src/scss/_root.scss | 2 +- src/scss/editor/_base.scss | 6 +++++- src/scss/front/_base.scss | 4 ++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/class/loos_hcb.php b/class/loos_hcb.php index 145f024..e27d60e 100644 --- a/class/loos_hcb.php +++ b/class/loos_hcb.php @@ -190,7 +190,7 @@ public static function get_inline_style() { // Code Lang (Default) if ( 'off' === $HCB['show_lang'] ) { - $inline_css .= '.hcb_wrap{--hcb--data-label: none;--hcb--btn-offset: 0px;}'; + $inline_css .= '.hcb_wrap>pre{--hcb--data-label: none;}.hcb_wrap{--hcb--btn-offset: 0px;}'; } // Font smoothing diff --git a/src/scss/_root.scss b/src/scss/_root.scss index 2ad8b99..e4da137 100644 --- a/src/scss/_root.scss +++ b/src/scss/_root.scss @@ -9,7 +9,7 @@ --hcb--pX: 1.5em; --hcb--radius: 3px; --hcb--linenumW: 3.5ch; // It works if the line number is less than or equal to 999 - --hcb--data-label: attr(data-lang); + --hcb--data-label: none; --hcb--btn-offset: 20px; // デフォルトカラー diff --git a/src/scss/editor/_base.scss b/src/scss/editor/_base.scss index a5fc9e0..9eedd34 100644 --- a/src/scss/editor/_base.scss +++ b/src/scss/editor/_base.scss @@ -141,6 +141,11 @@ // Lang Name +.hcb_wrap > pre, +.hcb-block { + --hcb--data-label: attr(data-lang); +} + .hcb_wrap > pre::before, // for Classic .hcb-block::before { position: absolute; @@ -182,4 +187,3 @@ // .hcb-block[data-show-lang="0"]:not([data-file])::before { // content: none; // } - diff --git a/src/scss/front/_base.scss b/src/scss/front/_base.scss index 999274a..e73a7b9 100644 --- a/src/scss/front/_base.scss +++ b/src/scss/front/_base.scss @@ -166,6 +166,10 @@ // Lang Name, File Name +.hcb_wrap > pre { + --hcb--data-label: attr(data-lang); +} + .hcb_wrap > pre::before { position: absolute; top: 0;