Skip to content
Moodle Design Systemby Didactika
Moodle 5.3 LTS
v0.1
EN

Spacing, radius and elevation

The spacers, corner radii and shadows of Bootstrap, as the theme sets them. Rows of components use gap, not margins.

Distances come from the spacing scale of Bootstrap (p-1 to p-5, m-*, gap-*), corners from its radius classes and depth from its shadows. A plugin adds no values of its own to any of them. The tables are read from the CSS of the selected version.

Spacing

Padding scale
p-1
p-2
p-3
p-4
p-5

Lay out a row or a grid of siblings with gap on the container (d-flex gap-2), not with margins on each child: margins collapse and double without warning, and gap does neither.

Radius

Corner radius
rounded-0
rounded
rounded-pill
rounded-circle

Forms, dialogs and the inside of panels keep the radius of the theme. Only the chrome of a list (the search and buttons of a toolbar, the actions of a row, badges and the size select of a pager) is rounded as a pill (rounded-pill).

Elevation

Shadows
shadow-sm
shadow
shadow-lg

Use elevation to say that something floats above the page (a dropdown, a floating bar, a dialog), not to decorate a card. A card sitting in the page has a border and no shadow, or shadow-sm when it must stand out, as the figures at the top of a dashboard do.