Bootstrap: classes, parameters and complete catalog#
What it is and where it comes from#
Bootstrap is an open-source web UI framework with components, web layout and utility styles. LayMesh pins original 5.3.8 CSS under MIT and applies supported appearance declarations.
Your first card#
page=canvas(size=(100mm,65mm),stylesheet="@laymesh/bootstrap.css",background="#f6f7fb")card=page.add(rect(size=(40mm,25mm),class="bg-primary rounded shadow"),anchor=center,target=page.center)page.add(text("Bootstrap: classes",class="text-primary"),anchor=top_center,target=card.bottom_center,offset=(0mm,8mm))bg-primary paints the background, rounded rounds corners and shadow adds a shadow. Background and text color classes target different parts of an object.
Learn by function#
| Function | Start with | Adjust next |
|---|---|---|
| Background and text | bg-primary, bg-success, text-primary |
Color variants and opacity utilities |
| Borders | border border-primary |
Color, width and removal |
| Corners | rounded |
Radius variants; explicit border_radius for a one-off override |
| Shadows | shadow-sm, shadow, shadow-lg |
Inline blur/spread/offset overrides |
| Typography | fw-bold, fst-italic |
Size, line height and project-provided fonts |
| Opacity and spacing | opacity-50, supported padding utilities |
Spacing does not replace anchors |
Partial overrides distinguish 2mm blur, spread and offset. Library importance does not override explicit Lay parameters.
Complete searchable catalog#
Every class, variable and keyframe retains upstream declarations and support status. Usable entries switch to complete source and real preview; helper classes may require a base class. Partial support applies supported declarations, rather than implementing a complete web component.
Catalog recipes give rect a low-specificity color and border so corners, opacity and motion are visible. Class declarations and variable consumers still cascade normally.
Adjust a property using project units
Edit the full source too. Selecting an entry loads its original recipe; Restore clears edits. Seek animation time under More → Playback controls.
page=canvas(size=(100mm,100mm),stylesheet="@laymesh/bootstrap.css",background="#f6f7fb")style {rect {background-color:#0d6efd;border:1px solid #20332f}text {background-color:#e9ecef;color:#212529;border:1px solid #adb5bd} }item=page.add(rect(size=(40mm,25mm),class="bg-primary"),anchor=center,target=page.center)Preview
Dependencies
examples/libraries/catalog-bootstrap.lay
