promptu
TypeScript icon, indicating that this package has built-in type declarations

6.1.0 • Public • Published

Promptu npm CI CD

A micro CSS-in-JS library that provides shorthands for commonly-used CSS rules as well as utility functions for transforming and parsing between CSS-compatible data types. For documentation please visit here.

Setup

$ npm install

# Run tests (against TypeScript source files)
$ npm test

# Build the library
$ npm run build

Usage

Promptu pairs well with Styled Components (or any other CSS-in-JS library). Example use:

import { align, container } from 'promptu'

const StyledRoot = styled.div`
  ${align.ftl} // Aligns to top left in fixed position
  ${container.fvtl} // Transforms this div into a flex box where children are vertically top left aligned
`

Normalizing Styles

A raw CSS file for just normalizing rules is generated and packaged into the released module at lib/normalize.css, which you can access directly via unpkg.

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="https://unpkg.com/promptu/lib/normalize.css">
  </head>
  <body>
  </body>
</html>

Readme

Keywords

Package Sidebar

Install

npm i promptu

Weekly Downloads

3

Version

6.1.0

License

MIT

Unpacked Size

243 kB

Total Files

24

Last publish

Collaborators

  • andrewscwei