Fix Global Styles Block Icon Color for Mini Cart (https://github.com/woocommerce/woocommerce-blocks/pull/7762)

* Update hex color val to currentColor.

* Remove fill attributes on SVG

Having the fill attributes explicitly defined on the SVG was setting the
icon to purple in unexpected cases.

This also reverts the quick attempt to adjust CSS selector for a fix, as
it was the incorrect approach.
This commit is contained in:
Daniel W. Robert 2022-12-08 09:55:25 -05:00 committed by GitHub
parent bc17c19262
commit 83ff85e008
1 changed files with 3 additions and 6 deletions

View File

@ -4,7 +4,7 @@
import { SVG } from '@wordpress/primitives';
const miniCartAlt = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<defs>
<mask
id="mask"
@ -27,12 +27,9 @@ const miniCartAlt = (
</mask>
</defs>
<g mask="url(#mask)">
<path
d="M2,4H0V6H2ZM2,2V0H0V2ZM4,4l1.8-.9L5.3,2H4Zm3.6,7.6,1.7,1,.5-.9-.4-1ZM6.3,14l-1.8-.9h0ZM20,17v2h2V17Zm0-2h2V13H20ZM8,15,6.2,14,4.6,17H8Zm1.1-2V11H7.9l-.6,1Zm9.2-1-1.8-1h0Zm3.6-6.5-1.8-1h0ZM6.2,4l-1.8.9L4.9,6H6.2ZM5.3,2l1.8-.9L6.5,0H5.3ZM4,4V2H0V4ZM4,2H2V6H4Zm5.4,8.7L5.8,3.1,2.2,4.9l3.6,7.5ZM8,15l1.3-2.4-3.5-2L4.5,13.1Zm0,0H8L4.5,13.1A4,4,0,0,0,8,19Zm12,0H8v4H20Zm-2,0v2h4V15ZM8,17H20V13H8Zm-.7-5L6.2,14l3.6,2,1.1-2Zm9.3-1H9.1v4h7.5Zm-.1,0h.1v4a4,4,0,0,0,3.5-2.1Zm3.6-6.5L16.5,11l3.6,1.9,3.5-6.5ZM21,6a1,1,0,0,1-.9-1.5l3.5,2A3,3,0,0,0,21,2ZM6.2,6H21V2H6.2ZM3.5,2.9l.9,2L8,3.1l-.9-2ZM2,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