Skip to content

fill

Utilities for controlling the interior fill color of vector SVG scenes rendered with svg_tw.

ISS preview
Iced + ISS preview demonstrating fill
ISS preview for fill
use iss::{svg_tw, tw, SvgScene};
let scene = SvgScene::new(24.0, 24.0).circle(12.0, 12.0, 9.0);
let icon = svg_tw(scene, tw!("size-8 fill-blue-500/25 stroke-blue-400 stroke-2"));
Tailwind Class CSS Property / Effect iss::typed Builder
fill-<color>-<shade> fill: <palette>; .fill(palette::BLUE_500)
fill-sky-500/30 Alpha-modified vector fill; .fill(palette::SKY_500.alpha(0.3))
fill-none / current / inherit / transparent Keyword SVG fills; .fill_none() / .fill_current()
fill-[#2563eb] / fill-(--color-primary) Arbitrary and @theme fills; .fill_var("--color-primary")
  • Use svg_tw or svg_handle_tw to apply CSS fill-* and stroke-* classes to vector icons.

stroke · stroke-width · drop-shadow