Skip to content

Commit 112b003

Browse files
authored
fix (icon-list): apply gradient directly to text, fix specificity issue (#3386)
1 parent b78448d commit 112b003

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/block/icon-list-item/style.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,14 @@
9696
li.wp-block-stackable-icon-list-item.stk-block-icon-list-item {
9797
margin-bottom: 0;
9898
}
99+
100+
// If single text color is added (not gradient), reset text-fill-color.
101+
// Icon list marker is only limited to single text color.
102+
// These ensure that having gradient in parent icon list still allows
103+
// modification in icon list items.
104+
.stk-block-icon-list-item__text:is(.has-text-color):not(.stk--is-gradient),
105+
.stk-block-icon-list-item__marker {
106+
-webkit-text-fill-color: initial !important;
107+
-moz-text-fill-color: initial !important;
108+
-o-text-fill-color: initial !important;
109+
}

src/block/icon-list/style.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ Typography.addStyles( blockStyles, {
212212
selector: [
213213
'ul li',
214214
'ol li',
215+
// Apply directly to span for gradient text color
216+
'ul li span',
217+
'ol li span',
215218
],
216219
hoverSelector: [
217220
'.%s:hover ul li',

0 commit comments

Comments
 (0)