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 🙏

© 2024 – Pkg Stats / Ryan Hefner

nebula.css

v1.0.0-rc4

Published

a CSS toolkit that generates utility classes for font sizes, colors, background colors and spacing, while having responsiveness in mind.

Downloads

8

Readme

Nebula CSS Framework

Greenkeeper badge npm version Build Status

pre-release

Nebula.css is a CSS toolkit based on SASS that generates utility classes for font sizes, colors, background colors and spacing, while having responsiveness in mind. By default, it also includes a reset stylesheet and a number of basic typographic styles.

Demo & Documentation | Usage | SassDoc

Where does it work well

  • Quick assembly of simple websites.
  • Your design system specifies colors, font sizes, and spacing amounts, and you want to quickly start building something.
  • You want to use consistent amounts of spacing between elements, that can change on different breakpoints.
  • You want to have a couple of predefined font sizes, that can scale on different breakpoints

What does it do

You define a base set of colors, font sizes, and spacing amounts, from which Nebula creates a set of CSS classes that you can use for building your website. You might want to increase things like font size or spacing when the viewport size allows it, so by applying one of Nebula's mixins at certain breakpoints you can scale up/down font sizes and spacing amounts for this breakpoint.

A basic Nebula installation generates classes like this:

// For every color you define in your website
.n-color-accent { color: #009CDA; }
.n-background-accent { background-color: #009CDA; }

// If you want, border classes can be generated for colors as well
.n-border-accent { border: 1px solid #009CDA; }

// You define a set of body and heading sizes
.n-type-h1, h1  { font-size: 31px; }
.n-type-normal  { font-size: 18px; }
.n-type-large   { font-size: 22px; }

// You can define a number of spacing values, it generates margin and padding classes
.n-spacing-medium  { margin: 40px 40px; }
.n-vspacing-medium { margin-top: 40px; margin-bottom: 40px; }
.n-hspacing-medium { margin-left: 40px; margin-right: 40px; }

.n-padding-medium  { padding: 40px 40px; }
.n-vpadding-medium { padding-top: 40px; padding-bottom: 40px; }
.n-hpadding-medium { padding-left: 40px; padding-right: 40px; }

Using a mixin then scales these items, for example with font-sizes:

@media screen and (min-width: $breakpoint-widescreen) {
  @include scale-type($bodyTextScale: 1.2);
}

// Outputs:
@media screen and (min-width: 1280px) {
  body { font-size: 21.6px; }
  .n-type-h1, h1 { font-size: 37.2px; }
  .n-type-normal { font-size: 21.6px; }
  .n-type-large  { font-size: 26.4px; }
}

Nebula is very modular, so you can disable certain modules if you don't want to have them in your output.

How to add Nebula to your project

Nebula.css can be used in a variety of ways:

1. Sass only

For when you already have a Sass setup or build pipeline, and want to add Nebula to it.

2. Javascript API

For when you want to use Nebula.css and programmatically generate a stylesheet with certain properties.

3. Command Line Interface

You want to use Nebula.css, but don't have a Sass pipeline or other build process for your stylesheets.

4. Basic CSS

A compiled version of Nebula can be found in dist/nebula.css. A minified version is also available there. You can include this into your HTML file and add your own styles in other files, make modifications, etc.

License

Licensed under the MIT License.