# react-native-yaml-styles

> Stylesheets in YAML for React Native

Latest version **1.0.0** (published 2016-01-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-yaml-styles
pnpm add react-native-yaml-styles
yarn add react-native-yaml-styles
bun add react-native-yaml-styles
```

## 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 | 1.0.0 |
| Published | 2016-01-23 |
| First published | 2016-01-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Johannes Stein |
| Maintainers | stoney |
| Keywords | react-native, yaml, yml, style, styles, stylesheet |

## Links

- npm: https://www.npmjs.com/package/react-native-yaml-styles
- Repository: https://github.com/frostney/react-native-yaml-styles
- Homepage: https://github.com/frostney/react-native-yaml-styles#readme
- Issues: https://github.com/frostney/react-native-yaml-styles/issues
- npm.io page: https://npm.io/package/react-native-yaml-styles

## Dependencies (3)

- [buffer](https://npm.io/package/buffer.md) ^4.3.0
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.4.6
- [change-case-object](https://npm.io/package/change-case-object.md) ^2.0.0

## Recent versions

- 1.0.0 (latest) — 2016-01-23
- 1.0.0-beta1 — 2016-01-23

## README

# react-native-yaml-styles
If you prefer YAML over JSON/JavaScript styles in your React Native projects

## Installation
```
$ npm install react-native-yaml-styles --save
```

## Usage
```javascript
var styles = YAMLStyleSheet.create(`
  welcome:
    font-size: 20
`);
```

## But... why?
I was talking with @pichfl about how much better YAML is than JSON over an `.eslintrc` file at a [Web & Wine meetup](http://www.meetup.com/web-and-wine/). I made a snarky remark about maybe using YAML for styles instead of CSS or other options and well... here we are.

## But... seriously... why?
- React components are getting bigger and bigger, we want everything to be concise but only split it up if necessarily needed. So with a YAML-based stylesheet, we're getting rid of all the pesky braces we're saving about 30% of lines in total
- Every JSON can be described as YAML
- It's super-similar to [SASS](http://sass-lang.com/documentation/file.INDENTED_SYNTAX.html) actually
- It's a bit of a middle ground between completely using a CSS preprocessor and having JSON-flavored styles right beside your component

## Code style
AirBnB ES5

## License
MIT

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