Skip to content

CSS: spacing ​

.--p-md — Margin and padding utilities — .--m<side>-<step> / .--margin-<side>-<step> and .--p<side>-<step> / .--padding-<side>-<step> on the spacing scale (sides t/b/s/e/x/y or none, spelled short or fully long — for example --mb-sm and --margin-bottom-small are the same rule; margin also takes auto). Usable bare or chained onto any component (for example class="instui-view --mb-sm").

Source: index.ts

Usage ​

css
@import "@pantoken/components/utilities.css";

Demo ​

Examples ​

Modifiers ​

ModifierDescription
.--p-mdApplies medium padding on all sides.
.--m*Margin utilities across short, legacy-long, and fully long spellings.
.--p*Padding utilities across short, legacy-long, and fully long spellings.

Accessibility ​

Spacing is visual only: use it to keep text and controls from crowding, not to convey structure — use headings, lists, and landmarks for that. Leave enough space around interactive targets for WCAG 2.5.8, and don't rely on fixed spacing that breaks when users increase text spacing.

ConditionsRebrand (light)Rebrand (dark)CanvasCanvas High Contrast
reflow-at-320pxWCAG 2.2 1.4.10PassPassPassPass
text-spacing-no-clippingWCAG 2.2 1.4.12PassPassPassPass
Screen reader (simulated)Rebrand (light)Rebrand (dark)CanvasCanvas High Contrast
AnnouncementsPassPassPassPass

These automated results do not establish that the page meets WCAG; manual review is still needed.

Tokens consumed ​

TokenTypeValue
--instui-component-shared-tokens-spacing-general-space-none<length>0rem
--instui-spacing-space-lg<length>1rem
--instui-spacing-space-md<length>0.75rem
--instui-spacing-space-sm<length>0.5rem
--instui-spacing-space-xl<length>1.5rem
--instui-spacing-space-xs<length>0.25rem
--instui-spacing-space2xl<length>2rem
--instui-spacing-space2xs<length>0.125rem