koutla swiss
🎨 CSS-in-JS toolkit, inspired by Kouto-Swiss
koutla swiss is a rewrite of kouto swiss (a CSS framework for Stylus) in pure javascript, to be used within css-in-js tools like glamor or emotion
Installation
$ npm install --save koutla-swiss
☝️ NOTE: koutla-swiss exports
cjs
andesm
modules.
Usage
koutla-swiss is a serie of useful, functional utilities to make CSS-in-JS (with librairies like glamor).
All the documented functions are accessibles from the root of the lib, like import {px, padding} from "koutla-swiss";
.
Documentation is generated with ESDoc and hosted in koutla-swiss.js.org.
Example
;;;; ; const styles = container: title: titleContent: flex: 1 hideTitle: icon: ; { let $icon; icon && $icon = <FontAwesomeIcon icon=icon css=stylesicon />; return <section css=stylescontainer className=className> <h2 css=stylestitle hideTitle && styleshideTitle> $icon <span css=stylestitleContent>title</span> </h2> children </section> ;};
👉 NOTE: this sample component is taken from my resume, which relies on koutla-swiss.
License
Copyright (c) 2018 leny.me Licensed under the MIT license.