Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(icon-list): apply gradient directly to text, fix specificity issue #3386

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/block/icon-list-item/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,14 @@
li.wp-block-stackable-icon-list-item.stk-block-icon-list-item {
margin-bottom: 0;
}

// If single text color is added (not gradient), reset text-fill-color.
// Icon list marker is only limited to single text color.
// These ensure that having gradient in parent icon list still allows
// modification in icon list items.
.stk-block-icon-list-item__text:is(.has-text-color):not(.stk--is-gradient),
.stk-block-icon-list-item__marker {
-webkit-text-fill-color: initial !important;
-moz-text-fill-color: initial !important;
-o-text-fill-color: initial !important;
}
3 changes: 3 additions & 0 deletions src/block/icon-list/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ Typography.addStyles( blockStyles, {
selector: [
'ul li',
'ol li',
// Apply directly to span for gradient text color
'ul li span',
'ol li span',
],
hoverSelector: [
'.%s:hover ul li',
Expand Down
Loading