Skip to content

Commit

Permalink
Merge pull request #7 from vektor-inc/develop
Browse files Browse the repository at this point in the history
[ Change version ] 0.1.0
  • Loading branch information
kurudrive authored Oct 19, 2021
2 parents e077c35 + 59f64dc commit 53f20d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/VkColorPaletteManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package vektor-inc/vk-color-palette-manager
* @license GPL-2.0+
*
* @version 0.0.10
* @version 0.0.11
*/

namespace VektorInc\VK_Color_Palette_Manager;
Expand Down Expand Up @@ -139,8 +139,9 @@ public static function inline_css() {
if ( ! empty( $color['color'] ) ) {
// 色はこのクラスでだけの利用なら直接指定でも良いが、他のクラス名で応用できるように一旦css変数に格納している.
$dynamic_css .= ':root{ --' . $color['slug'] . ':' . $color['color'] . '}';
$dynamic_css .= '.has-' . $color['slug'] . '-color { color:var(--' . $color['slug'] . '); }';
$dynamic_css .= '.has-' . $color['slug'] . '-background-color { background-color:var(--' . $color['slug'] . '); }';
// .has- だけだと負けるので :root は迂闊に消さないように注意
$dynamic_css .= ':root .has-' . $color['slug'] . '-color { color:var(--' . $color['slug'] . '); }';
$dynamic_css .= ':root .has-' . $color['slug'] . '-background-color { background-color:var(--' . $color['slug'] . '); }';
}
}

Expand Down

0 comments on commit 53f20d1

Please sign in to comment.