Skip to content

background-clip

Utilities for controlling the bounding box to which a background color or gradient is clipped, including gradient text.

BackgroundsTailwind v4 Spec
ISS preview
Iced + ISS preview demonstrating background-clip
ISS preview for background-clip
use iced::widget::text;
use iss::{tw, TwExt};
let headline = text("Iced Style Sheet").tw(tw!(
"text-3xl font-extrabold bg-linear-to-r from-blue-400 to-cyan-300 bg-clip-text text-transparent"
));
Tailwind Class CSS Property / Effect iss::typed Builder
bg-clip-border background-clip: border-box; .bg_clip_border()
bg-clip-padding background-clip: padding-box; .bg_clip_padding()
bg-clip-content background-clip: content-box; .bg_clip_content()
bg-clip-text background-clip: text; .bg_clip_text()
  • Pair bg-clip-text with text-transparent and a gradient to render gradient-filled text.

background-image · background-origin · color