Margin
マージンを付与するユーティリティ CSS。
Table of Contents
Basic
.is-m{way}-{size}で各方向にmarginを付与します.is-m-{size}は全方向.is-mt-{size}は上方向.is-mr-{size}は右方向.is-mb-{size}は下方向.is-ml-{size}は左方向.is-my-{size}は上下方向.is-mx-{size}は左右方向{size}は最大xxlから最小xxsに加えnoneautoを指定できます
| サイズ | 全方向 | 上方向 | 右方向 | 下方向 | 左方向 | 上下方向 | 左右方向 |
|---|---|---|---|---|---|---|---|
| 28px | .is-m-xxl | .is-mt-xxl | .is-mr-xxl | .is-mb-xxl | .is-ml-xxl | .is-my-xxl | .is-mx-xxl |
| 24px | .is-m-xl | .is-mt-xl | .is-mr-xl | .is-mb-xl | .is-ml-xl | .is-my-xl | .is-mx-xl |
| 20px | .is-m-lg | .is-mt-lg | .is-mr-lg | .is-mb-lg | .is-ml-lg | .is-my-lg | .is-mx-lg |
| 16px | .is-m-md | .is-mt-md | .is-mr-md | .is-mb-md | .is-ml-md | .is-my-md | .is-mx-md |
| 12px | .is-m-sm | .is-mt-sm | .is-mr-sm | .is-mb-sm | .is-ml-sm | .is-my-sm | .is-mx-sm |
| 8px | .is-m-xs | .is-mt-xs | .is-mr-xs | .is-mb-xs | .is-ml-xs | .is-my-xs | .is-mx-xs |
| 4px | .is-m-xxs | .is-mt-xxs | .is-mr-xxs | .is-mb-xxs | .is-ml-xxs | .is-my-xxs | .is-mx-xxs |
| 0 | .is-m-none | .is-mt-none | .is-mr-none | .is-mb-none | .is-ml-none | .is-my-none | .is-mx-none |
| auto | .is-m-auto | .is-mt-auto | .is-mr-auto | .is-mb-auto | .is-ml-auto | .is-my-auto | .is-mx-auto |
マージンテスト
マージンテスト
マージンテスト
<div>マージンテスト</div>
<div class="box is-mt-md">マージンテスト</div>
<div>マージンテスト</div>Compatible
推奨のクラス名と同様の効果を互換のあるクラス名で得ることもできます。
| 推奨のクラス名 | 互換のあるクラス名 |
|---|---|
.is-m-md | .is-margin-md .is-margin |
.is-mt-md | .is-margin-top-md .is-margin-top |
.is-mr-md | .is-margin-right-md .is-margin-right |
.is-mb-md | .is-margin-bottom-md .is-margin-bottom |
.is-ml-md | .is-margin-left-md .is-margin-left |
.is-my-md | .is-margin-vertical-md .is-margin-vertical |
.is-mx-md | .is-margin-horizontal-md .is-margin-horizontal |
Variables
上書きできる変数は以下の通りです。
/* None */Import
PostCSS で読み込む場合の各パスは以下となります。
@import "musubii/src/utilities/margin/main.css";