Skip to content

Commit cc8e7af

Browse files
committed
init
0 parents  commit cc8e7af

File tree

6 files changed

+87
-0
lines changed

6 files changed

+87
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.DS_Store
3+
modules
4+
*.log

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
system-ui
2+
=========
3+
4+
> Fallbacks for the W3C CSS generic [`system-ui`](https://www.w3.org/TR/css-fonts-4/#system-ui-def) font-family.
5+
6+
## Install
7+
8+
```sh
9+
$ yarn add system-ui
10+
# npm v5+
11+
$ npm install system-ui
12+
# before npm v5
13+
$ npm install --save system-ui
14+
```
15+
16+
## Usage
17+
18+
```js
19+
import system_ui from "system-ui";
20+
import { injectGlobal } from "styled-components";
21+
22+
injectGlobal`
23+
body {
24+
font-family: ${system_ui}, sans-serif;
25+
font-size: 16px;
26+
27+
color: #000;
28+
}
29+
`;
30+
```
31+
32+
Chores
33+
======
34+
35+
- Build: `yarn build`
36+
37+
- Pretty: `yarn pretty`
38+
39+
License
40+
=======
41+
42+
MIT.

generate.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const list = [
2+
"system-ui",
3+
"-apple-system",
4+
"BlinkMacSystemFont",
5+
"Segoe UI",
6+
"Roboto",
7+
"Oxygen",
8+
"Ubuntu",
9+
"Cantarell",
10+
"Fira Sans",
11+
"Droid Sans",
12+
"Helvetica Neue"
13+
];
14+
15+
const compiled = list.join(", ");
16+
17+
console.log(`module.exports = "${compiled}";`);

index.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module.exports =
2+
"system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue";

package.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "system-ui",
3+
"version": "1.0.0",
4+
"description": "Fallbacks for the W3C CSS generic system-ui font-family.",
5+
"main": "index.js",
6+
"license": "MIT",
7+
"scripts": {
8+
"test": "true",
9+
"build": "node generate.js > index.js",
10+
"pretty": "prettier --write --tab-width 4 '*.js'"
11+
},
12+
"devDependencies": {
13+
"prettier": "^1.7.4"
14+
}
15+
}

yarn.lock

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
prettier@^1.7.4:
6+
version "1.7.4"
7+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.4.tgz#5e8624ae9363c80f95ec644584ecdf55d74f93fa"

0 commit comments

Comments
 (0)