Skip to content

CSS: spacing

.--p-md — các tiện ích margin và padding — .--m<side>-<step> / .--margin-<side>-<step>.--p<side>-<step> / .--padding-<side>-<step> trên thang khoảng cách (các phía t/b/s/e/x/y hoặc không có, viết tắt hoặc viết đầy đủ — ví dụ --mb-sm--margin-bottom-small là cùng một quy tắc; margin cũng nhận auto). Có thể dùng độc lập hoặc ghép vào bất kỳ component nào (ví dụ class="instui-view --mb-sm").

Source: index.ts

Sử dụng

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

Demo

Các ví dụ

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

Bộ sửa

Bộ sửaMô tả
.--p-mdÁp dụng padding cỡ trung bình ở tất cả các phía.
.--m*Các tiện ích margin theo dạng viết tắt, dạng dài cũ và dạng dài đầy đủ.
.--p*Các tiện ích padding theo dạng viết tắt, dạng dài cũ và dạng dài đầy đủ.

Token tiêu thụ

TokenKiểuGiá trị
--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