Skip to main content
Version: 17+

Helpers

v13 → v17 change

Most one-off helpers (nm, flex-center, text-center, show--m / hide--m, hide--important, sr-only…) are no longer custom Igloo classes — use Tailwind utilities instead. A handful of Igloo-specific helpers remain, listed below.

Use Tailwind utilities

Reach for Tailwind for spacing, alignment, visibility and typography. Common equivalents to the old helpers:

NeedTailwind
Remove margin / paddingm-0 / p-0
Centre childrenflex items-center justify-center
Text alignmenttext-left / text-center / text-right
Hide an elementhidden
Show/hide by breakpointhidden md:block, md:hidden, etc.
Screen-reader onlysr-only

Igloo safelists the commonly used utilities (display, items-*, text-*, justify-*, font-*, opacity-*, grid-cols-112) so they're always available even when only referenced from CMS content. See the Tailwind documentation.

Igloo-specific helpers

ClassPurpose
componentStandard block padding (--component-spacing). Added automatically by <igloo-block-wrap>.
container, container-sm, container-lg, container-fluidCentred max-width wrappers — see Layout & grid.
rowA simple flex row (flex flex-row flex-wrap).
palette-{key}Applies a palette's colours (normally set by igloo-block-wrap).
highlightPalette highlight background/text — see Typography.
loadingLoading animation on an element.
error-color / success-colorValidation text colours — see Forms.

Images use lazy-loading and an overlay utility is available for media backgrounds; both are applied by the relevant blocks.