Skip to content

CSS: spacing

.--p-md — 邊距與內距工具 — 在間距刻度上使用 .--m<side>-<step> / .--margin-<side>-<step>.--p<side>-<step> / .--padding-<side>-<step>(側邊:t/b/s/e/x/y,或不設,支援短寫或完整長寫拼法 — 例如 --mb-sm--margin-bottom-small 為相同規則;邊距也接受 auto)。可直接使用或串接於任何元件(例如 class="instui-view --mb-sm")。

Source: index.ts

使用方法

css
@import "@pantoken/components/utilities.css";

示範

範例

html
<div class="--p-md --mt-lg">Padded box with a large top margin.</div>

修飾器

修飾器說明
.--p-md在所有邊緣套用中等內距。
.--m*提供邊距工具類,支援短寫、舊式長寫與完整長寫拼法。
.--p*提供內距工具類,支援短寫、舊式長寫與完整長寫拼法。

已使用的代幣

Token型別
--instui-component-shared-tokens-spacing-general-space-none<length>0rem
--instui-spacing-space-lg<length>1rem
--instui-spacing-space-md<length>0.75rem
--instui-spacing-space-sm<length>0.5rem
--instui-spacing-space-xl<length>1.5rem
--instui-spacing-space-xs<length>0.25rem
--instui-spacing-space2xl<length>2rem
--instui-spacing-space2xs<length>0.125rem