Search

Primitive Class

Lism provides Primitive classes as small building blocks for composing layouts.

  • is--{name}: Trait Primitives that apply a static structural trait to an element.
  • l--{name}: Layout Primitives that serve as the building blocks of layouts.
  • a--{name}: Atomic Primitives that represent the smallest units of a layout.

By combining these, you can build complex layouts. The c-- prefixed Component Class represents concrete UI parts composed from these Primitives.

Primitive classes are standalone classes that do not have variations (such as --outline) or child element classes (such as _header). Only c-- Component Classes follow a BEM-like structure.

Combination Rules

CombinationAllowedNotes
l-- × l--NGSame category cannot be combined
a-- × a--NGSame category cannot be combined
is-- × is--OKMultiple Traits can be combined
l-- × is--OK
a-- × is--OK
l-- × a--DiscouragedNot intended to coexist
l-- × c--OKe.g. c--nav l--flex
a-- × c--OK

Trait Primitives

Primitives that represent static structural traits that can be toggled on any element.

ClassDescription
is--containerDefines the reference element for container queries
is--wrapperWrapper element that controls content width
is--layerOverlay layer positioned over a parent element
is--boxLinkMakes the entire box a clickable link
is--verticalApplies vertical writing mode
is--coverLinkA link with a clickable area covering the entire parent element (→ see is--boxLink)
is--sideFor the side element of l--sideMain (→ see l--sideMain)
is--skipFlowCancels spacing with the next sibling inside l--flow (→ see l--flow)

Layout Primitives

Primitives that serve as the building blocks of layouts.

ClassDescription
l--boxSimple primitive for grouping content
l--flowFlow-root primitive that auto-manages spacing between children
l--frameFits child media to its own size
l--flexLays out content using Flexbox
l--clusterArranges items horizontally with automatic wrapping
l--stackArranges elements vertically
l--sideMainTwo-column layout with side and main areas
l--gridLays out content using CSS Grid
l--tileGridUniform row-column grid (tile layout)
l--centerCenters content both horizontally and vertically
l--columnsColumn layout with breakpoint-based column counts
l--fluidColsFluid columns that wrap based on column width
l--switchColsAutomatically switches between multi-column and single-column

Atomic Primitives

Primitives that represent the smallest units of a layout.

ClassDescription
a--decoratorEmpty element for decoration
a--dividerDivider line between content
a--iconOutputs an SVG icon
a--spacerEmpty element for spacing between elements

© Lism CSS. All rights reserved.