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

@scalescss/scalescss

v6.0.0-1

Published

Scales is a design-free collection of OOCSS patterns, framework settings, & utilities to quickly build mobile-first, responsive web projects

Downloads

324

Readme

Scales

Scales is a modular CSS framework for quickly building responsive web projects. It clocks in at only 3.8kb when minified and gzipped.

It is purposely "design-free" so that there is nothing you will have to change. Instead, you will build your design on top of the foundation that Scales provides.

This is a framework for serious developers and designers who aren't afraid to get their hands dirty with advanced and sometimes challenging CSS concepts. A framework shouldn't do your work for you or make all of the decisions. Scales tries it's best to stay out of your way.

Scales is a highly scalable CSS architecture, it contains design patterns (scales in nature form patterns), and it is responsive so it scales to the width of the viewport. So clever it hurts.

Monorepo

Scales is managed as a monorepo. All of the Scales source code lives in a single repo, but is released as separate packages using Lerna.

Looking for the previous version of scales?

Scales 2.6.1

Techniques/Concepts Used in Scales

  • ITCSS (Inverted Triangle CSS) architecture
  • Object Oriented CSS Design Patterns
  • Responsive Design
  • Sass/scss
  • BEM (Block, Element, Modifier)-style naming convention

Browser Support

Scales uses box-sizing: border-box;, and display: table-cell;, neither of which are supported in IE7 and under. There are a few media queries, but they are an enhancement. Thus, Scales is only for IE9+ and any modern browser, but IE8 is also mostly covered.

Dependencies

  • Sass - Either Ruby Sass or Libsass.
  • NPM - To pull all of the scales packages together.

Setup

Make sure you have the dependencies installed on your system and then, from the root directory of your project, run:

npm install --save @scalescss/scalescss

Next you will want to create 3 files (name them whatever you want):

  1. A settings/variables file. ex. _settings.scss
  2. A file to import all of the Scales packages. ex. _scalescss.scss
  3. A main file to import the settings, Scales packages, and all of your project partials. ex. styles.scss

Settings/Variables

Scales exposes a large number of variables that allow you to customize nearly everything.

Have a look at all of the available variables.

The Scales Packages

Each piece of Scales is its own package on npm. Once you have all of the packages in your project, you will need to import them into your project. I recommend creating a _scalescss.scss file that imports everything.

The order of the imports is very important!

See an example of the correct import order.

Main Sass File

Once you have these files sorted out, you will want to create a main Scss file that will import your settings, Scales, and the rest of your project partials. This is the file that will get compiled into CSS:

@import your-project/settings;
@import your-project/scalescss;
@import your-project/project-partial;
@import your-project/project-partial;
@import your-project/project-partial;
@import your-project/project-partial;

Compile to CSS

Once you have these things set up you simply need to tell Sass what to compile:

$ sass your-project/styles.scss your-project/css/styles.css

There are many other options for compiling that you can find in the Sass Documentation. You can also look into using a task runner like Gulp or a module bundler like Webpack.

Pattern Library

The scalescss package includes an index.html file that serves as a basic pattern library for Scales. It shows all of the available patterns in their default state. This can be used as a reference, for testing, or styled into a more complete pattern library with your project's patterns as well.

Props

This couldn't have been done without the amazing work of Harry Roberts on inuitcss. A number of the design patterns and techniques in Scales were borrowed or adapted from inuitcss.

I also wanted to thank Nicole Sullivan for her work on OOCSS, without which I would not be the developer I am today.

Sites using Scales

v2

v1

Meta

Devtroit