# map.sass

> functions for sass map

Latest version **0.0.6** (published 2017-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install map.sass
pnpm add map.sass
yarn add map.sass
bun add map.sass
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2017-04-08 |
| First published | 2017-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | x7c1 |
| Maintainers | x7c1 |
| Keywords | sass, scss, css, map |

## Links

- npm: https://www.npmjs.com/package/map.sass
- Repository: https://github.com/x7c1/map.sass
- npm.io page: https://npm.io/package/map.sass

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2017-04-08
- 0.0.5 — 2017-04-08
- 0.0.4 — 2017-04-08
- 0.0.3 — 2017-04-08
- 0.0.2 — 2017-04-08
- 0.0.1 — 2017-04-08

## README

# map.sass

Functions for Sass map.

## Install

```
yarn add map.sass
```

## Usage Example

### Defining a color palettes

By using a map-access function like following `my-color-palettes.scss`.

```scss
@import '~map.sass/map-access.scss';
$color-palettes: (
  error: (
    fg: white,
    bg: red,
  ),
  anchor: (
    base: (
      normal: blue,
      hover: yellow,
    ),
  ),
);
@function my-palette($keys...) {
  @return map-access($palettes, $keys...);
}
```

`map-get(map-get(map-get(...)...)...)` is no longer necessary.

```scss
@import './my-color-palettes';
.warning-message {
  color: my-palette(error, fg);
  background-color: my-palette(error, bg);

  // you can also access to any nested map
  a { color: my-palette(anchor, base, normal); }
  a:hover { color: my-palette(anchor, base, hover); }
}
```

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