Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Adjust size of SVG
Browse files Browse the repository at this point in the history
The new SVG was rendering a little bit smaller than the original icon.
Potentially because of the mask and the artboard size.

This commit adjusts the size to render at the same size as the original
version of the icon in the inserter.
  • Loading branch information
danielwrobert committed Jul 29, 2022
1 parent e260fb4 commit 9fd50c5
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions assets/js/icons/library/mini-cart-alt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,34 @@ import { SVG } from '@wordpress/primitives';

const miniCartAlt = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
<mask id="path-1-inside-1_928_1005" fill="white">
<defs>
<mask
id="mask"
x="0"
y="0"
width="24.01"
height="24"
maskUnits="userSpaceOnUse"
>
<g
id="path-1-inside-1_928_1005"
data-name="path-1-inside-1 928 1005"
>
<path
d="M2,2V4H4l3.6,7.6L6.3,14A2,2,0,0,0,8,17H20V15H8l1.1-2h7.5a1.9,1.9,0,0,0,1.7-1l3.6-6.5A1,1,0,0,0,21,4H6.2L5.3,2ZM8,18a2,2,0,1,0,2,2A2,2,0,0,0,8,18Zm8,2a2,2,0,1,1,2,2A2,2,0,0,1,16,20Z"
fill="#fff"
fillRule="evenodd"
/>
</g>
</mask>
</defs>
<g mask="url(#mask)">
<path
fillRule="evenodd"
clipRule="evenodd"
d="M4 5V6.5H5.5L8.2 12.1925L7.1875 14.0225C6.64 15.0275 7.36 16.25 8.5 16.25H17.5V14.75H8.5L9.325 13.25H14.9125C15.475 13.25 15.97 12.9425 16.225 12.4775L18.91 7.61C19.1875 7.115 18.8275 6.5 18.2575 6.5H7.1575L6.4525 5H4ZM8.50001 17C7.67501 17 7.00751 17.675 7.00751 18.5C7.00751 19.325 7.67501 20 8.50001 20C9.32501 20 10 19.325 10 18.5C10 17.675 9.32501 17 8.50001 17ZM14.5075 18.5C14.5075 17.675 15.175 17 16 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028 13.3049L7.1875 14.0225ZM17.5 16.25V17.75H19V16.25H17.5ZM17.5 14.75H19V13.25H17.5V14.75ZM8.5 14.75L7.18568 14.0271L5.96309 16.25H8.5V14.75ZM9.325 13.25V11.75H8.43809L8.01068 12.5271L9.325 13.25ZM16.225 12.4775L14.9116 11.753L14.9098 11.7563L16.225 12.4775ZM18.91 7.61L17.6015 6.87648L17.5966 6.88549L18.91 7.61ZM7.1575 6.5L5.79996 7.13804L6.20508 8H7.1575V6.5ZM6.4525 5L7.81004 4.36196L7.40491 3.5H6.4525V5ZM5.5 6.5V5H2.5V6.5H5.5ZM5.5 5H4V8H5.5V5ZM9.55528 11.5497L6.85528 5.85718L4.14472 7.14282L6.84472 12.8353L9.55528 11.5497ZM8.5 14.7487L9.5125 12.9187L6.8875 11.4663L5.875 13.2963L8.5 14.7487ZM8.5 14.75C8.49588 14.75 8.49369 14.7497 8.49316 14.7497C8.49262 14.7496 8.49311 14.7496 8.49439 14.75C8.49728 14.7508 8.50057 14.7522 8.50336 14.7538C8.5059 14.7553 8.50678 14.7563 8.50641 14.7559C8.50595 14.7555 8.50471 14.7541 8.50333 14.7517C8.50196 14.7494 8.5011 14.7472 8.50067 14.7458C8.50027 14.7444 8.50045 14.7444 8.5005 14.7458C8.50055 14.7474 8.50034 14.7492 8.5001 14.7502C8.50002 14.7505 8.5001 14.7501 8.50063 14.7487C8.50116 14.7473 8.50235 14.7444 8.50472 14.7401L5.87028 13.3049C4.785 15.2971 6.20768 17.75 8.5 17.75V14.75ZM17.5 14.75H8.5V17.75H17.5V14.75ZM16 14.75V16.25H19V14.75H16ZM8.5 16.25H17.5V13.25H8.5V16.25ZM8.01068 12.5271L7.18568 14.0271L9.81432 15.4729L10.6393 13.9729L8.01068 12.5271ZM14.9125 11.75H9.325V14.75H14.9125V11.75ZM14.9098 11.7563C14.912 11.7522 14.914 11.7508 14.9147 11.7505C14.9153 11.7501 14.9159 11.7499 14.9163 11.7498C14.9169 11.7496 14.916 11.75 14.9125 11.75V14.75C16.0319 14.75 17.0263 14.1358 17.5402 13.1987L14.9098 11.7563ZM17.5966 6.88549L14.9116 11.753L17.5384 13.202L20.2234 8.33451L17.5966 6.88549ZM18.2575 8C17.6846 8 17.3169 7.3843 17.6016 6.87649L20.2184 8.34351C21.0581 6.8457 19.9704 5 18.2575 5V8ZM7.1575 8H18.2575V5H7.1575V8ZM5.09496 5.63804L5.79996 7.13804L8.51504 5.86196L7.81004 4.36196L5.09496 5.63804ZM4 6.5H6.4525V3.5H4V6.5ZM8.50751 18.5C8.50751 18.4982 8.50766 18.4979 8.50756 18.4984C8.50747 18.4988 8.50733 18.4992 8.50722 18.4995C8.50711 18.4998 8.50751 18.4988 8.50871 18.4976C8.50988 18.4964 8.50981 18.497 8.50723 18.4981C8.50584 18.4987 8.50412 18.4993 8.50229 18.4996C8.50037 18.5 8.49942 18.5 8.50001 18.5V15.5C6.83681 15.5 5.50751 16.8564 5.50751 18.5H8.50751ZM8.50001 18.5C8.49942 18.5 8.50037 18.5 8.50229 18.5004C8.50412 18.5007 8.50584 18.5013 8.50723 18.5019C8.50981 18.503 8.50988 18.5036 8.50871 18.5024C8.50751 18.5012 8.50711 18.5002 8.50722 18.5005C8.50733 18.5008 8.50747 18.5012 8.50756 18.5016C8.50766 18.5021 8.50751 18.5018 8.50751 18.5H5.50751C5.50751 20.1436 6.83681 21.5 8.50001 21.5V18.5ZM8.50001 18.5V21.5C10.1534 21.5 11.5 20.1534 11.5 18.5H8.50001ZM8.50001 18.5H11.5C11.5 16.8466 10.1534 15.5 8.50001 15.5V18.5ZM16 15.5C14.3368 15.5 13.0075 16.8564 13.0075 18.5H16.0075C16.0075 18.4982 16.0077 18.4979 16.0076 18.4984C16.0075 18.4988 16.0073 18.4992 16.0072 18.4995C16.0071 18.4998 16.0075 18.4988 16.0087 18.4976C16.0099 18.4964 16.0098 18.497 16.0072 18.4981C16.0058 18.4987 16.0041 18.4993 16.0023 18.4996C16.0004 18.5 15.9994 18.5 16 18.5V15.5ZM19 18.5C19 16.8466 17.6534 15.5 16 15.5V18.5H19ZM16 21.5C17.6534 21.5 19 20.1534 19 18.5H16V21.5ZM13.0075 18.5C13.0075 20.1436 14.3368 21.5 16 21.5V18.5C15.9994 18.5 16.0004 18.5 16.0023 18.5004C16.0041 18.5007 16.0058 18.5013 16.0072 18.5019C16.0098 18.503 16.0099 18.5036 16.0087 18.5024C16.0075 18.5012 16.0071 18.5002 16.0072 18.5005C16.0073 18.5008 16.0075 18.5012 16.0076 18.5016C16.0077 18.5021 16.0075 18.5018 16.0075 18.5H13.0075Z"
fill="#7F54B3"
mask="url(#path-1-inside-1_928_1005)"
/>
<circle cx="18" cy="7" r="3" fill="#7F54B3" />
</g>
<circle cx="20.2" cy="4.7" r="3.8" fill="#7f54b3" />
</SVG>
);

Expand Down

0 comments on commit 9fd50c5

Please sign in to comment.