ユーティリティ
単機能のクラスを組み合わせて、CSSを書かずに調整できます。
よく使うユーティリティ:
| 分類 | 例 |
|---|---|
| 余白 | m-3 / mt-2 / px-4 / gap-2(0〜5, auto) |
| Flexbox | d-flex / justify-content-between / align-items-center / flex-wrap |
| 表示 | d-none / d-md-block / d-print-none |
| 色 | text-primary / bg-light / text-bg-dark / border |
| 文字 | fw-bold / fs-4 / text-center / text-truncate |
| 位置/寸法 | position-relative / w-100 / h-100 / top-0 |
| 角丸/影 | rounded / rounded-pill / shadow-sm |
ユーティリティは「ユーティリティAPI」(SCSSの $utilities マップ)で追加・変更・削除できます。