Skip to content

Commit 4a221f6

Browse files
committed
refactor(ui): use path-only icons
1 parent cfcce70 commit 4a221f6

File tree

2 files changed

+14
-35
lines changed

2 files changed

+14
-35
lines changed

index.html

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ <h2>Duplicate card?</h2>
566566
<span class="visually-hidden">Duplicate joker</span>
567567

568568
<svg class="icon">
569-
<use xlink:href="#duplicate-icon"></use>
569+
<use xlink:href="#copy-icon"></use>
570570
</svg>
571571

572572
</button>
@@ -668,7 +668,7 @@ <h2>Duplicate card?</h2>
668668
<span class="visually-hidden">Duplicate card</span>
669669

670670
<svg class="icon">
671-
<use xlink:href="#duplicate-icon"></use>
671+
<use xlink:href="#copy-icon"></use>
672672
</svg>
673673
</button>
674674

@@ -783,59 +783,37 @@ <h2>Duplicate card?</h2>
783783
<defs>
784784
<symbol id="close-icon" role="img" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
785785
<title>Close icon</title>
786-
<rect width="256" height="256" fill="none" />
787-
<line x1="200" y1="56" x2="56" y2="200" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
788-
<line x1="200" y1="200" x2="56" y2="56" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
786+
<path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>
789787
</symbol>
790788

791-
<symbol id="duplicate-icon" role="img" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
792-
<title>Duplicate icon</title>
793-
<rect width="256" height="256" fill="none" />
794-
<polyline points="168 168 216 168 216 40 88 40 88 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
795-
<rect x="40" y="88" width="128" height="128" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
789+
<symbol id="copy-icon" role="img" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
790+
<title>Copy icon</title>
791+
<path d="M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"></path>
796792
</symbol>
797793

798794
<symbol id="file-arrow-down-icon" role="img" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
799795
<title>File arrow down icon</title>
800-
<rect width="256" height="256" fill="none" />
801-
<path d="M200,224H56a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h96l56,56V216A8,8,0,0,1,200,224Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
802-
<polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
803-
<line x1="128" y1="120" x2="128" y2="184" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
804-
<polyline points="104 160 128 184 152 160" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
796+
<path d="M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-42.34-61.66a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L120,164.69V120a8,8,0,0,1,16,0v44.69l10.34-10.35A8,8,0,0,1,157.66,154.34Z"></path>
805797
</symbol>
806798

807-
<symbol id="file-arrow-up-icon" role="img" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/symbol">
799+
<symbol id="file-arrow-up-icon" role="img" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
808800
<title>File arrow up icon</title>
809-
<rect width="256" height="256" fill="none" />
810-
<path d="M200,224H56a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h96l56,56V216A8,8,0,0,1,200,224Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
811-
<polyline points="152 32 152 88 208 88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
812-
<polyline points="104 144 128 120 152 144" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
813-
<line x1="128" y1="184" x2="128" y2="120" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
801+
<path d="M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-42.34-77.66a8,8,0,0,1-11.32,11.32L136,139.31V184a8,8,0,0,1-16,0V139.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"></path>
814802
</symbol>
815803

816804
<symbol id="floppy-disk-icon" role="img" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
817805
<title>Floppy disk icon</title>
818-
<rect width="256" height="256" fill="none" />
819-
<path d="M216,83.31V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H172.69a8,8,0,0,1,5.65,2.34l35.32,35.32A8,8,0,0,1,216,83.31Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
820-
<path d="M80,216V152a8,8,0,0,1,8-8h80a8,8,0,0,1,8,8v64" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
821-
<line x1="152" y1="72" x2="96" y2="72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
806+
<path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"></path>
822807
</symbol>
823808

824809
<symbol id="plus-icon" role="img" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
825810
<title>Plus icon</title>
826-
<rect width="256" height="256" fill="none" />
827-
<line x1="40" y1="128" x2="216" y2="128" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
828-
<line x1="128" y1="40" x2="128" y2="216" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
811+
<path d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"></path>
829812
</symbol>
830813

831-
<symbol id="trash-icon" role="img" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
814+
<symbol id="trash-icon" role="img" viewBox="0 0 256 256" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
832815
<title>Trash icon</title>
833-
<rect width="256" height="256" fill="none" />
834-
<line x1="216" y1="56" x2="40" y2="56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
835-
<line x1="104" y1="104" x2="104" y2="168" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
836-
<line x1="152" y1="104" x2="152" y2="168" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
837-
<path d="M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
838-
<path d="M168,56V40a16,16,0,0,0-16-16H104A16,16,0,0,0,88,40V56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" />
816+
<path d="M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"></path>
839817
</symbol>
840818
</defs>
841819
</svg>

src/ui/css/_components.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.icon {
2+
fill: currentColor;
23
width: 16px;
34
height: 16px;
45
}

0 commit comments

Comments
 (0)