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;