Performance: Text transform utilities
LOW IMPACT
Text transform utilities affect the rendering speed by changing how text is displayed without altering the DOM structure.
<p class="text-uppercase">hello world</p>
HTML: <p id="text">hello world</p> JavaScript: document.getElementById('text').textContent = document.getElementById('text').textContent.toUpperCase();
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| JavaScript text content change | Modifies DOM text node | 1 reflow per change | 1 repaint | [X] Bad |
| CSS text-transform utility | No DOM changes | 0 reflows | Paint only if style changes | [OK] Good |