translate
Utilities for translating an element along X, Y, or Z axes using spacing units, percentages, or fractions.
ISS preview

Examples
Section titled “Examples”use iced::widget::container;use iss::{tw, TwExt};
let badge = container(label).tw(tw!("absolute top-0 right-0 translate-x-1/2 -translate-y-1/2 px-2 py-0.5 bg-rose-500 rounded-full"));use iss::typed::*;
let style = IssStyle::new().absolute().top(0).right(0).translate_x_frac(1, 2).translate_y_frac(-1, 2);Class Reference
Section titled “Class Reference”| Tailwind Class | CSS Property / Effect | iss::typed Builder |
|---|---|---|
translate-x-<n> / translate-y-<n> |
translate: <x> <y>; |
.translate_x(4) / .translate_y(-2) |
translate-x-1/2 / -translate-x-1/2 / full |
Percentage/fractional shifts; |
.translate_x_frac(-1, 2) |
translate-z-<n> |
3D Z-axis translation; |
.translate_z(4) |
translate-none |
translate: none; |
.translate_none() |
translate-x-[18px] |
Arbitrary pixel shift; |
.translate_x_px(18) |
Behavior Notes
Section titled “Behavior Notes”- Fractional offsets like
-translate-x-1/2resolve against the element’s own measured size.