# basscss-position

> CSS positioning utilities for Basscss

Latest version **2.0.3** (published 2016-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install basscss-position
pnpm add basscss-position
yarn add basscss-position
bun add basscss-position
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2016-02-13 |
| First published | 2015-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5896 |
| Author | Brent Jackson |
| Maintainers | jxnblk |

## Links

- npm: https://www.npmjs.com/package/basscss-position
- Repository: https://github.com/basscss/basscss
- Issues: https://github.com/basscss/basscss/issues
- npm.io page: https://npm.io/package/basscss-position

## Recent versions

- 2.0.3 (latest) — 2016-02-13
- 2.0.2 — 2016-02-05
- 2.0.1 — 2016-02-03
- 2.0.0 — 2015-12-18

## README

This module includes basic positioning utilities to alter the default document flow.

<p class="red">Use positions with caution. They are often unnecessary and commonly misused.</p>

Use `.relative` to create a new stacking context.

```html
<div class="relative">
  <div>Hamburger</div>
</div>
```

Use `.absolute` to move elements out of the default document flow.

```html
<div class="relative mb4">
  <div>Hamburger</div>
  <div class="absolute bg-white border rounded">
    <a href="#" class="block p1">Dropdown Action</a>
    <a href="#" class="block p1">Action</a>
  </div>
</div>
```

Use `.fixed` to position an element relative to the viewport. Fixed positioning is notoriously tricky to use well and can lead to inaccessible content and unwanted side effects. Use fixed positioning with caution.

```html
<div class="fixed">
  Hamburger
</div>
```

*Note: fixed positioning has been disabled here for demonstration only.*

To anchor to a particular side, use `.top-0`, `.right-0`, `.bottom-0`, or `.left-0`. Margin and padding utilities can be used to space elements apart.

```html
<div class="fixed top-0 right-0 m2">
  Hamburger
</div>
```

To fill an entire width or height, use opposing directions.

```html
<div class="fixed top-0 left-0 right-0 p2 white bg-black">
  Fixed bar
</div>
```

To ensure the desired stacking order, use z-index utilities.

```html
<div class="fixed z2 top-0 left-0 right-0 p2 white bg-black">
  Fixed bar
</div>
```

---
_Source: https://npm.io/package/basscss-position · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
