Package

purescript-tecton

Repository
nsaunders/purescript-tecton
License
MIT
Uploaded by
nsaunders
Published on
2023-06-13T01:05:11Z

CI Latest release PureScript registry purescript-tecton on Pursuit Tests

Tecton is a domain-specific language for authoring CSS, embedded in PureScript. The unique capabilities of PureScript allow Tecton's strongly-typed interface to guard against a wide range of errors while remaining highly flexible like vanilla CSS.

Live Demo

Quick example

Input

body ? Rule.do
  width := pct 100
  height := pct 100
  padding := px 16 ~ px 32

media screen { minWidth: px 768 } ?
  body ?
    padding := pct 5 ~ pct 10

Output

body {
  width: 100%;
  height: 100%;
  padding: 16px 32px;
}
@media screen and (min-width: 768px) {
  body {
    padding: 5% 10%;
  }
}

Many more examples are located in the examples and test subdirectories.

Installation

The preferred installation method is Spago.

spago install tecton

Related