Module margin

Module margin 

Source
Expand description

Utilities for controlling an element’s margin.

Class Properties
m-<float>margin: <float / 4>rem;
m-<integer>/<integer>margin: (<integer>/<integer>)%;
m-pxmargin: 1px;
m-automargin: auto;
mx-<float>margin-inline: <float / 4>rem;
mx-<integer>/<integer>margin-inline: (<integer>/<integer>)%;
mx-pxmargin-inline: 1px;
mx-automargin-inline: auto;
my-<float>margin-block: <float / 4>rem;
my-<integer>/<integer>margin-block: (<integer>/<integer>)%;
my-pxmargin-block: 1px;
my-automargin-block: auto;
ms-<float>margin-inline-start: <float / 4>rem;
ms-<integer>/<integer>margin-inline-start: (<integer>/<integer>)%;
ms-pxmargin-inline-start: 1px;
ms-automargin-inline-start: auto;
me-<float>margin-inline-end: <float / 4>rem;
me-<integer>/<integer>margin-inline-end: (<integer>/<integer>)%;
me-pxmargin-inline-end: 1px;
me-automargin-inline-end: auto;
mt-<float>margin-top: <float / 4>rem;
mt-<integer>/<integer>margin-top: (<integer>/<integer>)%;
mt-pxmargin-top: 1px;
mt-automargin-top: auto;
mr-<float>margin-right: <float / 4>rem;
mr-<integer>/<integer>margin-right: (<integer>/<integer>)%;
mr-pxmargin-right: 1px;
mr-automargin-right: auto;
mb-<float>margin-bottom: <float / 4>rem;
mb-<integer>/<integer>margin-bottom: (<integer>/<integer>)%;
mb-pxmargin-bottom: 1px;
mb-automargin-bottom: auto;
ml-<float>margin-left: <float / 4>rem;
ml-<integer>/<integer>margin-left: (<integer>/<integer>)%;
ml-pxmargin-left: 1px;
ml-automargin-left: auto;

§Tailwind compatibility

Margin values don’t follow Tailwind’s philosophy of limiting possible values and all spacing values are supported. They are however perfectly compatible with Tailwind’s values.

§Arbitrary values

Any <length> property is allowed as arbitrary value. For example, mt-[5vw].

§Negative values

This plugin supports negative values. For example, -mt-2 or hover:-mt-2.

Tailwind reference