Performance: Text transform (uppercase, lowercase)
LOW IMPACT
This affects the browser's paint phase by changing how text is displayed without altering the DOM content.
<p class="uppercase">Some Text</p><p>Some Text</p>
<script>
const p = document.querySelector('p');
p.textContent = p.textContent.toUpperCase();
</script>| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| JavaScript text content change | 1 text node update | 1 reflow | 1 repaint | [X] Bad |
| Tailwind text-transform utility | 0 DOM changes | 0 reflows | 1 repaint | [OK] Good |