Skip to content

Commit

Permalink
icon color fix
Browse files Browse the repository at this point in the history
  • Loading branch information
seothemes committed Dec 23, 2023
1 parent e614806 commit f964a27
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
1 change: 1 addition & 0 deletions assets/css/blocks/comments-title.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/blocks/post-comments-form.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion includes/extensions/icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ function get_icon_html( string $content, array $block ): string {
}

if ( $gradient ) {
$figure_styles['--wp--custom--icon--color'] = "var(--wp--preset--gradient--{$gradient})";

if ( $text_color || $custom_text_color ) {
$figure_styles['--wp--custom--icon--background'] = "var(--wp--preset--gradient--{$gradient})";
} else {
$figure_styles['--wp--custom--icon--color'] = "var(--wp--preset--gradient--{$gradient})";
}
}

$border_radius = $attrs['style']['border']['radius'] ?? null;
Expand Down
17 changes: 17 additions & 0 deletions src/scss/blocks/comments-title.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@import "../abstracts/text-gradient";

.wp-block-comments-title {
word-break: break-word;

&[class*="-font-size"] {
line-height: var(--wp--custom--heading--line-height, 1.5);
}

&[class*="-gradient-background"]:not(.has-text-color),
&[style*="-gradient("]:not(.has-text-color) {

@include text-gradient;
}
}


8 changes: 7 additions & 1 deletion src/scss/blocks/post-comments-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
.wp-block-post-comments-form textarea {
border: var(--wp--custom--border);
}
// Core override.

// Core override.
.wp-block-post-comments-form .comment-reply-title :where(small) {
font-size: var(--wp--custom--small--font-size, 0.5em);
margin-left: var(--wp--style--block-gap, 1em);
}

.form-submit {
--wp--custom--button--background: var(--wp--custom--comments-form--submit--background);
--wp--custom--button--color: var(--wp--custom--comments-form--submit--color);
}

0 comments on commit f964a27

Please sign in to comment.