Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

compass-scalablegs-plugin

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compass-scalablegs-plugin

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
3
Created
Source

Scalable Grid System - Compass Plugin

Scalable.gs is a cross screen size and device CSS framework. Check out the Scalable.gs website for more information and use cases.

  • This plugin is consistent with latest version of scalable.gs as of 4/5/2011

This plugin adds the Scalable Grid System framework to Compass.

The plugin is build upon the great work done by Christopher M. Eppstein and Matt Sanders with the 960 Grid System framework compass plugin. The framework follows some of the name convention from the 960.gs by Nathan Smith.

#Install

gem install compass-scalablegs-plugin

##Create a Scalablegs-based Compass Project

compass create -r scalable my_project --using scalable

Or, If you prefer to use Sass's indentation based syntax:

compass create -r scalable my_project --using scalable --syntax sass

Then edit your scalable.sass accordingly.

Customising your Grid System

This plugin uses the following configuration variables:

  • $scalable-columns (default: 20) controls the default number of grid columns
  • $scalable-grid-min-width (default: 26em - with the assumption of a 12px body font size) controls the default minimum site width
  • $scalable-grid-max-width (default: 82em - with the assumption of a 12px body font size) controls the default maximum site width
  • $scalable-gutter-width (default: 2%) controls the default gutter width

All of the mixins included with this plugin use these configuration variables as defaults if the corresponding argument is omitted from a mixin call.

Class-Based Grid System

To create a grid system that works like the original Scalable.gs framework use the +grid-system mixin to generate the corresponding classes. You can also customize the number of columns as demonstrated in the following example.

Example:

#wrap
  +grid-system(24)

Making Semantic Grids

To create a grid system using only CSS, use the following semantic grid mixins:

  • Use the +grid-container mixin to declare your container element.
  • Use the +grid(N, columns, gutter-width) mixin to declare a grid element.
  • Use the +first and +last mixins to declare the first and last grid elements for a row.
  • Use the +grid-prefix(N, columns) and +grid-suffix(N, columns) mixins to add empty grid columns before or after a grid element.
  • Use the +grid-push(N, columns) and +grid-pull(N, columns) mixins to move a grid element from its default position.

N is the number of grid columns to span as in grid_N or push_N with the original 960 Grid System framework.

Example:

$scalable-columns: 24

#wrap
  +grid-container
  #left-nav
    +first
    +grid(5)
  #main-content
    +grid-prefix(1)
    +grid(10)
    +last

Authors/Contributors

Chris Eppstein is the creator of Compass, a core contributor to Sass and the father of this plugin.

Nathan Smith is the author of 960.gs, the grid system this plugin is based on. He's also kind enough to let us pester him with questions from time to time.

Matt Sanders is probably the best go to person if you want more information about the original compass-960-plugin.

Kenneth Nordahl forked and then converted the original plugin over to the Scalable Grid System.

Other contributors have worked on original fork of this plugin.

FAQs

Package last updated on 04 Oct 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc