Skip to content

Commit

Permalink
Update colors to v2 mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
dancormier committed Aug 29, 2023
1 parent ca60fd8 commit 21dca77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/build/write-svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ export async function processSvgFilesAsync(type: OutputType) {
) // Add classes and aria-attributes since our source files don't have them
.replace(/fill="#000"/gi, "") // Remove any fills so paths are colored by the parents' color
.replace(/fill="none"/gi, "") // Remove any empty fills that SVGO's removeUselessStrokeAndFill: true doesn't remove
.replace(/fill="#222426"/gi, 'fill="var(--black-800)"') // Replace hardcoded hex value with appropriate CSS variables
.replace(/fill="#222426"/gi, 'fill="var(--black-600)"') // Replace hardcoded hex value with appropriate CSS variables
.replace(/fill="#fff"/gi, 'fill="var(--white)"')
.replace(/fill="#6A7E7C"/gi, 'fill="var(--black-500)"')
.replace(/fill="#1A1104"/gi, 'fill="var(--black-900)"')
.replace(/fill="#6A7E7C"/gi, 'fill="var(--black-400)"')
.replace(/fill="#1A1104"/gi, 'fill="var(--black-600)"')
.replace(
/linearGradient id="(.*?)/gi,
`linearGradient id="${icon}$1`
Expand Down

0 comments on commit 21dca77

Please sign in to comment.