Veylo has a small set of utility classes for spacing, flex and grid layout, and text. All of them are scoped to .veylo. They are bare words (flex, gap2), not prefixed, so they stay short in markup.
| Class | Effect |
|---|---|
flex, grid, block, inline, none | Set display |
wrap | flex-wrap: wrap |
col | flex-direction: column |
grow | flex: 1 1 auto; use on an input in a .row to fill the line |
between | justify-content: space-between |
items-c | align-items: center |
center | Centre on both axes |
cols-2, cols-3, cols-4, cols-6 | Grid with that many equal columns (use with grid) |
auto-fit | Responsive grid: as many columns as fit, each at least 12rem |
gap1, gap2 | 4px and 8px gap |
cluster | Wrapping flex row, centred vertically, 8px gap. Best for button rows |
stack | Flex column with 8px gap |
row | One form line: flex, centred, 8px gap, wraps. A leading label gets a minimum width so fields line up |
<div class="grid cols-3 gap2">
<div class="veylo-card"><h4>One</h4><div>...</div></div>
...
</div>
<div class="cluster"><button>OK</button><button>Cancel</button></div>
<div class="row"><label for="n">Name</label><input id="n" class="grow"></div>| Class | Effect |
|---|---|
m0, mt0 | Remove all margin, or only the top margin |
mt1, mt2 | Top margin 4px, 8px |
mb1, mb2 | Bottom margin 4px, 8px |
| Class | Effect |
|---|---|
tl, tc, tr | Text align left, centre, right |
b, i, u | Bold, italic, underline |
mono | Monospace font |
dim | Secondary text colour (--text-dim) |
sm | Small text (on plain elements; on buttons and some components it also means the compact size) |
clip | Single line with an ellipsis |
nosel | Disable text selection |
raise, sink, etch | Apply the bevel shadows to any element |
face, field, acc | Background colours: surface, input, accent (accent also sets white text) |
bd | 1px border in the rule colour |
w100 | width: 100% |
fl, fr, clear | Float left, float right, clear |
| Class | Effect |
|---|---|
hide, [hidden] | Remove from layout (the hidden attribute always wins, even over flex) |
sr | Visually hidden but available to screen readers |
skip | Skip link: hidden until focused, then shown at the top left |
.veylo is centred with a maximum width of --measure (58rem) and 8px padding. For a full-width app, override it:
.veylo { max-width: none; margin: 0; }.veylo-desk sets a page background from --desk if you want one without JavaScript. When printing, the width limit and the window shadow are removed.
.veylo-split lays out panes side by side with draggable gutters. Add v for vertical. Split panes nest, and any number of panes works. Give the container a height.
<div class="veylo-split" style="height:16rem">
<div>Left</div>
<div class="veylo-split v"><div>Top</div><div>Bottom</div></div>
</div>The gutters are inserted for you. They take the keys in Keyboard and mouse. While dragging, the gutter and split get the drag class.
.veylo-layout is a two-column grid: a 12rem sidebar and a flexible content column. The docs you are reading use it. Put a ul.veylo-nav first (see Navigation), then one content element.
<div class="veylo-layout">
<ul class="veylo-nav"><li><a href="#" class="on">Overview</a></li><li><a href="#">API</a></li></ul>
<div>Content</div>
</div>On narrow screens the layout collapses to one column.