An open API service indexing awesome lists of open source software.

https://github.com/dashed/system-ui

Fallbacks for the W3C CSS generic system-ui font-family.
https://github.com/dashed/system-ui

css css-in-js css3 font system-ui

Last synced: 28 days ago
JSON representation

Fallbacks for the W3C CSS generic system-ui font-family.

Awesome Lists containing this project

README

          

system-ui [![Build Status](https://travis-ci.org/dashed/system-ui.svg)](https://travis-ci.org/dashed/system-ui) [![npm version](https://img.shields.io/npm/v/system-ui.svg?style=flat)](https://www.npmjs.com/package/system-ui)
=========

[![Greenkeeper badge](https://badges.greenkeeper.io/dashed/system-ui.svg)](https://greenkeeper.io/)

> Fallbacks for the W3C CSS generic [`system-ui`](https://www.w3.org/TR/css-fonts-4/#system-ui-def) font-family.
>
> Adapted from: https://github.com/JLHwung/postcss-font-family-system-ui

## Install

```sh
$ yarn add system-ui
# npm v5+
$ npm install system-ui
# before npm v5
$ npm install --save system-ui
```

## Usage

```js
import system_ui from "system-ui";
import { injectGlobal } from "styled-components";

// system_ui == "system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue"

injectGlobal`
body {
font-family: ${system_ui}, sans-serif;
font-size: 16px;

color: #000;
}
`;
```

Chores
======

- Build: `yarn build`

- Pretty: `yarn pretty`

License
=======

MIT.