@@ -292,33 +292,31 @@ function createPythonTooltip(data) {
292292 const pct = ( ( count / totalOpcodeSamples ) * 100 ) . toFixed ( 1 ) ;
293293 const barWidth = ( count / maxCount ) * 100 ;
294294 const specializedBadge = opcodeInfo . isSpecialized
295- ? '<span style="background: #2e7d32; color: white; font-size: 9px; padding: 1px 4px; border-radius: 3px; margin-left: 4px; ">SPECIALIZED</span>'
295+ ? '<span class="tooltip-opcode-badge ">SPECIALIZED</span>'
296296 : '' ;
297297 const baseOpHint = opcodeInfo . isSpecialized
298- ? `<span style="color: #888; font-size: 11px; margin-left: 4px; ">(${ opcodeInfo . baseOpname } )</span>`
298+ ? `<span class="tooltip-opcode-base-hint ">(${ opcodeInfo . baseOpname } )</span>`
299299 : '' ;
300+ const nameClass = opcodeInfo . isSpecialized
301+ ? 'tooltip-opcode-name specialized'
302+ : 'tooltip-opcode-name' ;
300303
301304 return `
302- <div style="display: grid; grid-template-columns: 1fr 60px 60px; gap: 8px; align-items: center; padding: 3px 0; ">
303- <div style="font-family: monospace; font-size: 11px; color: ${ opcodeInfo . isSpecialized ? '#2e7d32' : '#333' } ; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; ">
305+ <div class="tooltip-opcode-row ">
306+ <div class=" ${ nameClass } ">
304307 ${ opcodeInfo . opname } ${ baseOpHint } ${ specializedBadge }
305308 </div>
306- <div style="text-align: right; font-size: 11px; color: #666; ">${ count . toLocaleString ( ) } </div>
307- <div style="background: #e9ecef; border-radius: 2px; height: 8px; overflow: hidden; ">
308- <div style="background: linear-gradient(90deg, #3776ab, #5a9bd5); height: 100%; width: ${ barWidth } %;"></div>
309+ <div class="tooltip-opcode-count ">${ count . toLocaleString ( ) } </div>
310+ <div class="tooltip-opcode-bar ">
311+ <div class="tooltip-opcode-bar-fill" style=" width: ${ barWidth } %;"></div>
309312 </div>
310313 </div>` ;
311314 } ) . join ( '' ) ;
312315
313316 opcodeSection = `
314- <div style="margin-top: 16px; padding-top: 12px;
315- border-top: 1px solid #e9ecef;">
316- <div style="color: #3776ab; font-size: 13px;
317- margin-bottom: 8px; font-weight: 600;">
318- Bytecode Instructions:
319- </div>
320- <div style="background: #f8f9fa; border: 1px solid #e9ecef;
321- border-radius: 6px; padding: 10px;">
317+ <div class="tooltip-opcodes">
318+ <div class="tooltip-opcodes-title">Bytecode Instructions:</div>
319+ <div class="tooltip-opcodes-list">
322320 ${ opcodeLines }
323321 </div>
324322 </div>` ;
0 commit comments