gap: var(--a-space-m). Each item's margin and padding are derived from the same unit.
Purpose
Axiom01's layout is built on a single source of truth for all spacing: the CSS variable --a-space-unit. This variable generates a comprehensive, consistent scale (from --a-space-xs to --a-space-xxl) used for padding, margin, and gap properties throughout the framework. The Spacing Demo component provides a live, interactive way to understand and demonstrate this system.
Usage
To use the spacing demo, simply include the HTML structure and ensure index-page-manager.js is loaded. The component will automatically initialize the slider and update the displayed spacing values.
<div class="spacing" data-component="spacing-demo">
<div class="controls">
<label for="space-unit-slider">--a-space-unit: <span id="space-unit-value">1</span>rem</label>
<input type="range" id="space-unit-slider" min="0.5" max="2" step="0.1" value="1">
</div>
<div class="example">
<div class="item">Card (padding: --a-space-l)</div>
<div class="item">Button (padding: --a-space-m)</div>
<div class="item">Tag (padding: --a-space-s)</div>
</div>
<p class="example">The container above uses <code>gap: var(--a-space-m)</code>. Each item's margin and padding are derived from the same unit.</p>
</div>