# postcss-system-monospace

> Monospace fonts from your operating system

Latest version **4.0.0** (published 2021-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-system-monospace
pnpm add postcss-system-monospace
yarn add postcss-system-monospace
bun add postcss-system-monospace
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-09-05 |
| First published | 2019-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=12.0.0 |
| Dependencies | 0 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Philip Bordallo |
| Maintainers | philipbordallo |
| Keywords | monospace, system, font, family, postcss |

## Links

- npm: https://www.npmjs.com/package/postcss-system-monospace
- Repository: https://github.com/philipbordallo/postcss-system-monospace
- Homepage: https://github.com/philipbordallo/postcss-system-monospace#readme
- Issues: https://github.com/philipbordallo/postcss-system-monospace/issues
- npm.io page: https://npm.io/package/postcss-system-monospace

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [stockfish](https://npm.io/package/stockfish.md) — 27.0K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-09-05
- 3.0.0 — 2020-06-06
- 2.1.0 — 2020-03-01
- 2.0.0 — 2019-07-29
- 1.1.1 — 2019-02-18
- 1.0.0 — 2019-02-17

## README

# PostCSS System Monospace [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]
> Monospace fonts from your operating system

[![NPM Version][npm-img]][npm-url]
[![Dependency Status][david-img]][david-url]

Most systems have their own monospace font which `font-family: monospace` does not observe. This [PostCSS][postcss] plugin gives the ability to use the client system's monospace font via CSS.

```css
/* input */
.example {
  font-family: system-monospace;
}
```


```css
/* output */
.example {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
```

Check out the <a href="https://philipbordallo.github.io/postcss-system-monospace/">visual test</a>.

## Install 

```sh
# npm
npm install --save-dev postcss postcss-system-monospace

# or yarn
yarn add --dev postcss postcss-system-monospace
```


## Usage

Add it to your PostCSS work-flow, [whatever way you choose to](https://github.com/postcss/postcss#usage).

```js
// Using a postcss.config.js
const systemMonospace = require('postcss-system-monospace');

module.exports = {
  plugins: [
    systemMonospace
  ]
};

```

Then use the font-family name `system-monospace` where ever needed.
```css
.code {
  font-family: system-monospace;
}
```


## Fonts

| name | system |
| --- | --- |
`SFMono-Regular` | macOS
`Menlo` | macOS & iOS
`Monaco` | macOS
`Consolas` | Windows
`Liberation Mono` | Linux
`Courier New` | _fallback_
`monospace` | _fallback_


## Credits
- Nick Galbreath for his articles on operating system monospace fonts and their use with CSS, [CSS System Font Stack Monospace v1](https://www.client9.com/css-system-font-stack-monospace-v1/) & [CSS System Font Stack Monospace v2](https://www.client9.com/css-system-font-stack-monospace-v2/)


## [License](./LICENSE) ##


[david-img]: https://img.shields.io/david/philipbordallo/postcss-system-monospace.svg
[david-url]: https://david-dm.org/philipbordallo/postcss-system-monospace

[npm-img]: https://img.shields.io/npm/v/postcss-system-monospace.svg
[npm-url]: https://www.npmjs.com/package/postcss-system-monospace

[postcss]: https://github.com/postcss/postcss

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