Scales is a modular CSS framework for quickly building responsive web projects. It clocks in at only 3.7kb 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.
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.
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.
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):
Scales exposes a large number of variables that allow you to customize nearly everything.
Have a look at all of the available variables.
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.
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;
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
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.