Skip to content

margin

Utilities for controlling outer spacing, auto centering, negative offsets, and sibling space-between.

ISS preview
Iced + ISS preview demonstrating margin
m-2/.m(2)
use iced::widget::container;
use iss::{tw, TwExt};
let centered = container(panel).tw(tw!("w-full max-w-md mx-auto mt-6"));
Tailwind Class CSS Property / Effect iss::typed Builder
m-<n> / mx-<n> / my-<n> margin / margin-inline / margin-block; .m(4) / .mx(4) / .my(2)
mt-<n> / mr-<n> / mb-<n> / ml-<n> margin-top / right / bottom / left; .mt(4) / .mb(2)
ms-<n> / me-<n> margin-inline-start / margin-inline-end; .ms(3) / .me(3)
mx-auto / m-auto margin-inline: auto / margin: auto; .mx_auto() / .m_auto()
-mt-4 / -mx-2 Negative outer margins; .mt(-4)
space-x-<n> / space-y-<n> Sibling spacing along x or y axis; .space_x(3) / .space_y(2)
m-(--spacing-card) margin: var(--spacing-card); .m_var("--spacing-card")
  • ms-* and me-* flip automatically inside dir_rtl(...).

padding · gap · width