> By default, a long text will expand the size of its container. But it may make more sense to truncate long text. You can do this simply with, but that will unceremoniously clip text that overflows. You can improve the appearance by ellipsizing, although this is a bit finicky to get working as desired.<p>Or do my favorite: fade to transparent.<p><pre><code> @supports (-webkit-background-clip: text) or (background-clip: text){
element{
background-image: linear-gradient(currentColor, rgb(var(--your-background-color-rgb)));
webkit-text-fill-color: transparent;
webkit-background-clip: text;
background-clip: text;
}
}</code></pre>