mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 12:44:11 -10:00
Test: bench/background-clip-text/check.sh draws "Gradient" three ways: with background-clip, with -webkit-background-clip alone, and through a block inside the clipped one. The G's stem must be the gradient's pink, and the box beside and above each word must be the page's #111, as Chrome 148 gives them. Before: 6 of 10 pixels failed (the gradient box). After: PASS. TSX's backgroundClip and WebkitBackgroundClip, and an inline <span> inside, also match Chrome by eye. fps, the same 300-frame page with three clipped lines, before (17:54 build) and after, back to back in three rounds: 493/542/533 vs 518/599/489 fps incl. encode, no cost beyond the noise.
11 lines
878 B
HTML
11 lines
878 B
HTML
<!doctype html><html><body style="margin:0;background:#111">
|
|
<!-- #37: gradient text. The first line clips its background to its text with background-clip, the second with
|
|
-webkit-background-clip alone (as older Tailwind and most snippets write it), the third through a block inside
|
|
the clipped one, whose text is in the clip too. bench/background-clip-text/check.sh -->
|
|
<div data-composition-id="main" data-start="0" data-duration="1" data-width="640" data-height="360" style="font:bold 96px sans-serif;line-height:120px;color:transparent">
|
|
<div style="background:linear-gradient(90deg,#f0c,#0cf);background-clip:text">Gradient</div>
|
|
<div style="background:linear-gradient(90deg,#f0c,#0cf);-webkit-background-clip:text">Gradient</div>
|
|
<div style="background:linear-gradient(90deg,#f0c,#0cf);background-clip:text"><div>Gradient</div></div>
|
|
</div>
|
|
</body></html>
|