File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,14 +98,16 @@ body {
9898}
9999
100100# multiple-ul button : hover .code-chevron {
101- color : var (--pola-red );
101+ background- color: var (--pola-red );
102102}
103103
104104.code-icon {
105105 width : 18px ;
106106 height : 18px ;
107107 flex-shrink : 0 ;
108- color : var (--pola-red );
108+ background-color : var (--pola-red );
109+ -webkit-mask : url(../ icons/barcode.svg) no-repeat center / contain;
110+ mask : url(../ icons/barcode.svg) no-repeat center / contain;
109111}
110112
111113.code-value {
@@ -119,7 +121,10 @@ body {
119121 width : 16px ;
120122 height : 16px ;
121123 flex-shrink : 0 ;
122- color : var (--pola-inactive );
124+ background-color : var (--pola-inactive );
125+ -webkit-mask : url(../ icons/chevron-right.svg) no-repeat center / contain;
126+ mask : url(../ icons/chevron-right.svg) no-repeat center / contain;
127+ transition : background-color 0.15s ease;
123128}
124129
125130# result-name {
Original file line number Diff line number Diff line change 7272 for ( let ean of eans ) {
7373 let li = document . createElement ( 'li' ) ;
7474 let button = document . createElement ( 'button' ) ;
75- button . innerHTML =
76- '<svg class="code-icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">' +
77- '<rect x="2" y="5" width="2" height="14" rx="0.5" />' +
78- '<rect x="6" y="5" width="1" height="14" rx="0.5" />' +
79- '<rect x="9" y="5" width="2" height="14" rx="0.5" />' +
80- '<rect x="13" y="5" width="1" height="14" rx="0.5" />' +
81- '<rect x="16" y="5" width="1.5" height="14" rx="0.5" />' +
82- '<rect x="20" y="5" width="2" height="14" rx="0.5" />' +
83- '</svg>' +
84- '<span class="code-value"></span>' +
85- '<svg class="code-chevron" viewBox="0 0 24 24" fill="none" aria-hidden="true">' +
86- '<path d="M9 6l6 6-6 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />' +
87- '</svg>' ;
88- button . querySelector ( '.code-value' ) . textContent = ean ;
75+ let icon = document . createElement ( 'span' ) ;
76+ icon . className = 'code-icon' ;
77+ let value = document . createElement ( 'span' ) ;
78+ value . className = 'code-value' ;
79+ value . textContent = ean ;
80+ let chevron = document . createElement ( 'span' ) ;
81+ chevron . className = 'code-chevron' ;
82+ button . append ( icon , value , chevron ) ;
8983 button . addEventListener ( 'click' , this . setEan . bind ( this , ean ) ) ;
9084 li . appendChild ( button ) ;
9185 ul . appendChild ( li ) ;
You can’t perform that action at this time.
0 commit comments