• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    CSS
  • Created almost 15 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sass and Compass highly-configurable CSS grid framework

Grid Coordinates

This project is unmaintained, but has some good ideas that could be tranistioned to suit RWD and new Sass features.

A Sass based CSS Grid Framework Generator

Grid Coordinates is a highly configurable CSS Grid Framework written in Sass, inspired by Nathan Smith's 960.gs and Tyler Tate's 1kb CSS Grid.

Grid Coordinates takes the "coordinates" (grid columns, grid width and grid gutter width) and generates the styles required for your grid.

Grid Coordinates is designed to be used as a Compass extension and can be installed as a Ruby gem or as a stand alone Compass extension.

Just the grid

Grid Coordinates does one job - provide a rock solid grid framework. It's able to generate styles for grids of any size - you control the coordinates and it generates the styles.

It fully leverages classes, extends and mixins to set up the styles for your grid. It supports nested grids, prefix and suffix grid features as well as push and pull grid features.

Installation

gem install grid-coordinates

Then add require 'grid-coordinates' to your Compass config file.

Usage

Grid Coordinates defaults to a 960px grid with 12 columns and a 60px gutter (perfect for fans of 960.gs). You can override these defaults in your project if this grid doesn't suit your needs.

Use the variable grid system to plot the course for your CSS grid. The coordinates generated are based on the 960 Grid System, which is one point of inspiration for Grid Coordinates. Review the included test project for a simple demonstration of how to use Grid Coordinates.

Configure as needed and import

// Configure grid coordinates
$grid-columns: 12;
$grid-width: 60px;
$grid-gutter-width: 20px;

@import "grid-coordinates";

@include grid-coordinates;

Grid Coordinates's clearfix

The clearfix provided Grid Coordinates has an option to use a "clearfix-prefix". By default, the clearfix that ships with Grid Coordinates has no prefix and is simply compiled to .clearfix. If for some reason you're project already has a clearfix class, you shoulld either update to use the clearfix provided by Grid Coordinates or set the prefix variable to avoid conflicts.

For example:

$clearfix-prefix: "__"

This would output:

.__clearfix { ... }

Legacy users

If you are a legacy user of Grid Coordinates, it's possible that you've used the previously supported clearfix classes, .grid-clearfix and .grid-pie-clearfix. If that is the case, you may want to update any used of either of those classes, or set the variable $support-legacy-grid-clearfix to true. This will include those classes in the compiled CSS and @extend the new clearfix provided with Grid Coordinates.

Using classes and @extend

When you use the mixin @include grid-coordinates; (as shown above) you are able to leverage the CSS class selectors in your HTML markup or use the Sass @extend directive to "extend" the class selectors in your Sass stylesheets.

@extend .grid-container

@extend .nested-grid-container

@extend .grid-[columns]

@extend .grid-full

@extend .grid-prefix-[columns]

@extend .grid-suffix-[columns]

@extend .grid-push-[columns]

@extend .grid-pull-[columns]

Using mixins

Regardless if go the route of using the mixin @include grid-coordinates; (as shown above) or not, you'll have access to use these mixins in your Sass stylesheets. Keep in mind that when you go the route of using mixins, you could end up replicating a lot of code in your output CSS. Learn more about the Sass extend concept to see if you should use that method or mixins. Either way, Grid Coordinates got your back.

@include grid-container

@include nested-grid-container

@include grid([columns])

@include grid-full

@include grid-prefix([columns])

@include grid-suffix([columns])

@include grid-push([columns])

@include grid-pull([columns])

License

Copyright (c) 2009-2011 Adam Stacoviak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

sinatra-bootstrap

A simple Sinatra starting point
Ruby
378
star
2

animate.sass

Sass and Compass CSS animation library based on Animate.css
Ruby
325
star
3

zocial

Sass and Compass CSS3 social buttons framework
Ruby
189
star
4

meyer-reset

Eric Meyer CSS reset in Sass
Ruby
106
star
5

serve-bootstrap

Serve Bootstrap to aid in rapid design using Haml, Sass and Compass
Ruby
83
star
6

staticmatic-bootstrap

StaticMatic bootstrap with support for Haml, Sass, Compass and jQuery
JavaScript
71
star
7

pictos-free

Sass and Compass interface icon set (Pictos Free) from Drew Wilson
Ruby
52
star
8

font-stacks

Sass and Compass font-family library of common web-friendly font stacks
Ruby
39
star
9

nanoc-bootstrap

Nanoc bootstrap with support for Haml, Sass, Compass and jQuery
Ruby
36
star
10

jquery-qt-controller

A jQuery powered Quicktime Interface Controller
JavaScript
20
star
11

thor-wordpress

A set of Thor tasks to make developing with Wordpress easier
18
star
12

mailplane-hide-gmail-ads-css

A simple CSS file to use with Mailplane to hide the Gmail ads
14
star
13

compass-extension-bootstrap

Compass extension bootstrap is a simple starting point for creating Compass extensions.
Ruby
14
star
14

sass-textmate-bundle

A TextMate bundle to aid in rapid Sass development (indented syntax)
14
star
15

960-grid-system-textmate-bundle

TextMate Bundle for rapid development with 960.gs and HAML
12
star
16

smashing-layout

The Sass Way to recreate Smashing Magazine's layout (circa 2009)
Ruby
9
star
17

pictosfree.heroku.com

The demo for Pictos Free
Ruby
7
star
18

foundation-sass

SASSy-fied
JavaScript
6
star
19

nesta-bootstrap

A clean starting point for Nesta based sites using Haml, Sass and Compass
JavaScript
6
star
20

grid-coordinates.com

Hompage for Grid Coordinates - Sass based CSS Grid Framework Generator (Compass Extension)
Ruby
4
star
21

compass-simple

A simple, no fluff, project to use when illustrating code samples using Haml, Sass and Compass
Ruby
3
star
22

coffeefancy

Community-driven Coffee repo. Stars, stars, stars!
2
star
23

smashinglayout.com

Homepage for Smashing Layout - The Sass Way to recreate Smashing Magazine's layout (circa 2009)
JavaScript
2
star
24

ignitehouston-staticmatic

StaticMatic version of letsignitehouston.com
Ruby
1
star
25

itseasyjustsignup

Ruby
1
star
26

bedrock

Bedrock is a work in-progress.
Ruby
1
star
27

learningruby

Memoirs of an aspiring Rubyist
Ruby
1
star