Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/threepointone/es-grid-kiss

es6 tagged literals + css grids
https://github.com/threepointone/es-grid-kiss

Last synced: about 2 months ago
JSON representation

es6 tagged literals + css grids

Awesome Lists containing this project

README

        

es-grid-kiss
---

[postcss-grid-kiss](https://github.com/sylvainpolletvillard/postcss-grid-kiss), but in your js

```jsx
import { grid } from 'es-grid-kiss'

const App = () => grid`
"+------------------------------------+ "
"| ${} ↑ | 120px"
"+------------------------------------+ "
" "
"+-- 30% --------+ +--- auto --------+ "
"| ${} | | ${} | auto "
"+---------------+ +-----------------+ "
" "
"+------------------------------------+ "
"| ↓ | 60px "
"| → ${} ← | "
"+------------------------------------+ "
`
```

usage
---

add `'es-grid-kiss/lib/babel'` to the `plugins` field of your babel config

nb:
---
css grids are behind flags on major browsers, and the [polyfill](https://github.com/FremyCompany/css-grid-polyfill/) gives mixed results. ymmv.

todo
---
- css only fallback
- non-babel version, if there's any demand