Editing a page
All docsHow to change the words, styles, layout, pictures, fonts and motion of a page, in the window and from the command line.
Words and links
Double-click any text on the page, type, and press Enter or click away. Velluma changes only those words in the file, and keeps your spacing and comments as they were.
- To change where a link goes, run
velluma link setwith the link's number and the new address. - To describe a picture for screen readers, select it and fill in Alt text in the Image group of the Element panel.
velluma links --brokenlists every link that leads nowhere.
Text that repeats on every page
A header or footer copied onto every page is found as one shared piece: velluma repeated lists them, and one edit changes the copy on every page that holds it.
Styles
Select an element and use the Element panel. Numbers step with the arrow keys, eight at a time with Shift. You can also drag a number or its label sideways: the page follows, and letting go saves.
- The state switch at the top of the panel styles hover, focus and the other states.
- Changes land in the stylesheet rule that already styles the element, so a class used ten times changes ten times. When you want only this one to change, give it its own class.
- Ctrl Alt C copies an element's style and Ctrl Alt V pastes it onto another.
- The colour picker's Pick button takes any colour from the page.
From the command line, velluma style sets one property on a rule or an element, and velluma css writes several rules as one change with one Undo.
velluma style --file styles.css --selector .hero --digest DIGEST --property padding --to 4rem
Layout
Switch to the Layout tool (4). The selected element shows its inner and outer spacing as bands; drag a handle to change it. In the panel, set how the element arranges its children:
| Stack | Children in a row or a column, with a gap, alignment and wrapping. |
|---|---|
| Grid | Children in rows and columns you define. |
| Block | Normal flow, one after another. |
Each side of an element can be a fixed size, hug its content or fill the space, with a minimum and maximum. A layout can differ per width, so the phone version gets its own.
Move, group and duplicate
[ and ] move the selection up or down, g wraps several selected elements in a group and G takes them out again. a selects every element like the current one.
Blocks
The Add tab in the left panel holds 30 ready-made blocks. Each one arrives with its styles.
| Sections | Header, Hero large, Hero with picture, Hero split, Logos, Features, Stats, Pull quote, Bento, Steps, Pricing, FAQ, Call to action, Footer |
|---|---|
| Text | Heading, Text, Quote, List |
| Layout | Container, Columns, Grid, Divider |
| Media | Image, Figure |
| Controls | Button, Link, Form |
NoteIf a block's styles would clash with a class your site already styles differently, Velluma stops and asks whether to rename the block's class or keep yours.
Pictures
The Assets tab lists every image and whether a page uses it. From there, crop, resize, shrink or remove one. Cropping and resizing save a new copy and keep the original, and only a picture no page uses can be removed.
| Add | velluma asset add --name hero.jpg --source ~/Pictures/bread.jpg, optionally straight into an image on the page with its alt text |
|---|---|
| Crop and resize | asset crop, asset resize |
| Shrink | asset optimize, optionally to WebP and a maximum width |
| Sizes for every screen | asset responsive makes smaller copies and lets the browser pick the right one |
| Replace | asset replace swaps a picture's contents and keeps its name |
Fonts
Add a font three ways: from Google Fonts, from a font file in your site, or from the 19 open-licence families that come with Velluma, which are copied into your site with their licence so nothing loads from elsewhere.
velluma font add --family "Fraunces" --source bundled --weights 400,700
Motion
Select an element and press m. Transitions come with a still version for people who ask their computer for less motion, and check warns about any animation without one.
| Enter | Plays as the element scrolls into view: fade, rise, scale, slide left or slide right, with a delay and a stagger for groups. |
|---|---|
| Hover | Lift, scale or tint under the pointer and on keyboard focus. |
| Scroll | Ties movement or fading to the scroll position. |
| Transition | Smooths any change of a property, such as a colour on hover. |
| Toggle | Makes a button open and close another element, such as a menu. |