npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

styl

v0.2.9

Published

CSS pre-processor built on Rework

Readme

Styl

Work-in-progress CSS preprocessor. Spiritual successor of Stylus. Built on top of Rework.

Styl is basically an opinionated configuration of Rework. It does not aim for feature parity with Stylus.

If your application benefits from a runtime (conditionals, loops etc.), then Stylus is for you. If your application benefits from incredibly fast builds, simplicity, and the most transparent CSS preprocessor around, then Styl is for you.

Building Styl on top of Rework drastically reduces complexity. That’s because Rework is comprised of multiple smaller pieces, plugins, and has no complex runtime. If you wish to include custom plugins, or configure Styl beyond its defaults, the interface is the same as Rework.

Installation

$ npm install -g styl

or with component:

$ component install component/styl

or with a script tag using ./styl.js

Features

All Rework features and plugins are available out-of-the-box, including:

  • automatic vendor-prefixed properties
  • automatic vendor-prefixed values
  • automatic vendor-prefixed keyframes
  • additional easing functions
  • transparent support for retina hi-res images
  • rgba color helpers (rgba(#fc0, .5))
  • property reference support (height: @width)
  • several mixins
  • optional whitespace significant syntax
  • placeholder selectors
  • selector extensions
  • parent selector reference
  • nested selectors
  • command-line executable

styl(1)

Usage: styl [options]

Options:

  -h, --help            output usage information
  -V, --version         output the version number
  -v, --vendors <list>  vendor prefixes to apply [o,ms,moz,webkit]
  -w, --whitespace      use significant whitespace pre-processor
  -c, --compress        use output compression

Examples

CSS syntax

Regular CSS, with no vendor prefixing:

#logo {
  width: 50px;
  height: @width;
  absolute: top 100px left 50%;
  background: linear-gradient(top, black, white);
}

Compiled with the following command:

$ styl < simple.css > out.css

Yields:

#logo {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 100px;
  left: 50%;
  background: -o-linear-gradient(top, black, white);
  background: -ms-linear-gradient(top, black, white);
  background: -moz-linear-gradient(top, black, white);
  background: -webkit-linear-gradient(top, black, white);
  background: linear-gradient(top, black, white)
}

Whitespace significant syntax

The SASS-style (significant whitespace) syntax supports nesting and parent selector references. Currently, the CSS style does not; however this is likely to change in the future.


ul
  margin: 0
  li
    list-style: none
    a
      display: block
      text-decoration: none
      padding: 5px 10px
      &:hover
        text-decoration: underline

Compiled with the following command:

$ styl -w < simple.styl > out.css

Yields:

ul {
  margin: 0
}

ul li a:hover {
  text-decoration: underline
}

ul li a {
  display: block;
  text-decoration: none;
  padding: 5px 10px
}

ul li {
  list-style: none
}

API

Styl(string, options)

Initialize a new Styl with the given string of regular CSS or whitespace-significant style CSS with the following options:

  • whitespace enable css whitespace [false]
  • compress enable output compression [false]
var styl = require('styl');
var css = styl('body\n  color: blue', { whitespace: true }).toString();

Styl#toString()

Convert to CSS.

Projects

Projects built with Styl:

  • kube styl - styl implementation of the "kube" css framework

Build tools implementing Styl:

License

MIT