Skip to content

Commit 8a039a7

Browse files
authored
Add picosvg to optimization step (#883)
* Add picosvg to optimization step This should help remove `fill-rule="evenodd"` from SVGs, improving where they can be rendered. * Create thick-lions-explain.md
1 parent e05ddd3 commit 8a039a7

File tree

486 files changed

+506
-486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

486 files changed

+506
-486
lines changed

.changeset/thick-lions-explain.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/octicons": patch
3+
---
4+
5+
Remove fill-rule from SVGs using picosvg as an optimization step
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
picosvg~=0.20.6

.github/workflows/optimize.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
11
on:
22
push:
33
paths:
4-
- 'icons/**'
5-
- '.github/workflows/optimize.yml'
4+
- 'icons/**'
5+
- '.github/workflows/optimize.yml'
6+
- '.github/actions/python/requirements.txt'
7+
pull_request:
8+
paths:
9+
- 'icons/**'
10+
- '.github/workflows/optimize.yml'
11+
- '.github/actions/python/requirements.txt'
612
name: Optimize SVGs
713
jobs:
814
optimize:
915
runs-on: ubuntu-latest
1016
steps:
1117
- uses: actions/checkout@master
18+
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.10'
22+
cache: 'pip'
23+
- run: pip install -r .github/actions/python/requirements.txt
24+
- run: for icon in icons/*; do picosvg $icon --output_file $icon; done
25+
1226
- uses: actions/setup-node@master
1327
with:
1428
node-version: '10.x'
1529
- run: npm install
1630
- run: npm run svgo
31+
1732
- uses: EndBug/add-and-commit@v4
1833
with:
1934
add: 'icons'

icons/accessibility-16.svg

+1-1
Loading

icons/accessibility-inset-16.svg

+1-1
Loading

icons/alert-16.svg

+1-1
Loading

icons/alert-24.svg

+1-1
Loading

icons/alert-fill-12.svg

+1-1
Loading

icons/alert-fill-16.svg

+1-1
Loading

icons/alert-fill-24.svg

+1-1
Loading

icons/apps-16.svg

+1-1
Loading

icons/archive-16.svg

+1-1
Loading

icons/archive-24.svg

+1-1
Loading

icons/arrow-both-16.svg

+1-1
Loading

icons/arrow-down-16.svg

+1-1
Loading

icons/arrow-down-24.svg

+1-1
Loading

icons/arrow-down-left-16.svg

+1-1
Loading

icons/arrow-down-left-24.svg

+1-1
Loading

icons/arrow-down-right-16.svg

+1-1
Loading

icons/arrow-down-right-24.svg

+1-1
Loading

icons/arrow-left-16.svg

+1-1
Loading

icons/arrow-left-24.svg

+1-1
Loading

icons/arrow-right-16.svg

+1-1
Loading

icons/arrow-right-24.svg

+1-1
Loading

icons/arrow-up-16.svg

+1-1
Loading

icons/arrow-up-24.svg

+1-1
Loading

icons/arrow-up-left-16.svg

+1-1
Loading

0 commit comments

Comments
 (0)