# margin-inline-start

> Applies `margin-inline-start` — the leading inline edge, which is the left edge in `ltr` and the right edge in `rtl`.

```ts
import { mis } from "@sdxc/u/size";
```

Applies `margin-inline-start` — the leading inline edge, which is the
left edge in `ltr` and the right edge in `rtl`.

## Quick reference

Every documented call, beside the CSS it emits.

| Call | CSS |
| --- | --- |
| `u.mis("auto")` | `css({ marginInlineStart: "auto" })` |

## Examples

### Basic example

Use `mis(n)` to add margin to the inline-start edge of an element, its left in left-to-right text:

```tsx
<div mix={[...]}>
	<div mix={[mis(12), ...]}>mis(12)</div>
</div>
```

### Writing direction

`mis()` follows the writing direction: on the left in left-to-right text and on the right in right-to-left text:

```tsx
<div mix={[...]}>
	<div dir="ltr" mix={[...]}>
		<div mix={[mis(12), ...]}>ltr</div>
	</div>
	<div dir="rtl" mix={[...]}>
		<div mix={[mis(12), ...]}>rtl</div>
	</div>
</div>
```

### Overlapping items

Pass a negative step, like `mis(-4)`, to pull each item over the one before it, like a stack of avatars:

```tsx
<div mix={[hstack()]}>
	<img src={...} alt="" mix={[circle(), is(14), fit("cover"), ...]} />
	<img
		src={...}
		alt=""
		mix={[circle(), is(14), mis(-4), fit("cover"), ...]}
	/>
	<img
		src={...}
		alt=""
		mix={[circle(), is(14), mis(-4), fit("cover"), ...]}
	/>
	<div mix={[circle(), is(14), mis(-4), ...]}>+5</div>
</div>
```

## Applying on a state

Wrap the call in a state utility to scope it to one selector.

```ts
u.hover(u.mis("auto"))
```

## Responsive design

Wrap the call in a container query to scope it to one width.

```ts
u.at("md", u.mis("auto"))
```

## Customizing your theme

### Customizing spacing

Every numeric step multiplies `--ui-spacing`, so redefining it rescales every spacing and sizing utility at once:

```css
:root {
	--ui-spacing: 0.25rem;
}
```

Every call that names the step now reads the new value:

```ts
mis(4)
```

## Signature

```ts
u.mis(value: SpacingValue)
```
