File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,12 @@ export const Icon = props => {
202202 return
203203 }
204204
205+ // Don't use page icons for multicolor icons
206+ // because we target svg elements with the :nth-of-type() selector to apply the multicolor styles.
207+ if ( getAttribute ( 'iconColorType' ) === 'multicolor' ) {
208+ return
209+ }
210+
205211 // Check if icon exists in pageIcons Map
206212 // The Map structure is: [SVG string (key), { id: iconId, count: number } (value)]
207213 if ( _icon ) {
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ pageIconsWrapper?.setAttribute( 'id', 'stk-page-icons' )
2828domReady ( ( ) => {
2929 if ( pageIconsWrapper ) {
3030 pageIconsWrapper . setAttribute ( 'id' , 'stk-page-icons' )
31- pageIconsWrapper . setAttribute ( 'style' , 'display: none;' )
31+ // Don't use `display: none` to hide the page icons because it prevents gradients from being applied.
32+ pageIconsWrapper . setAttribute ( 'style' , 'position: absolute; top: 0; left: -9999px; width: 0; height: 0; visibility: hidden;' )
3233 createRoot ( pageIconsWrapper ) . render ( < PageIcons /> )
3334 }
3435} )
You can’t perform that action at this time.
0 commit comments