Giter Site home page Giter Site logo

abhoopathy / grid-coordinates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adamstac/grid-coordinates

1.0 2.0 0.0 1.08 MB

Highly configurable Sass based CSS Grid Framework Generator (Compass Extension)

Home Page: http://grid-coordinates.com/

grid-coordinates's Introduction

Grid Coordinates

A Sass based CSS Grid Framework Generator

Grid Coordinates is a highly configurable Sass based CSS Grid Framework Generator, inspired by 960 Grid System and 1kb CSS Grid. Grid Coordinates takes the "coordinates" (total columns, grid width, gutter width) and generates the styles required for your grid.

Grid Coordinates can be used as a Compass extension and is delivered as a Ruby gem.

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.

Take a peek at grid-coordinates.com/.../demo.sass for a demonstration of how to use Grid Coordinates as well its output CSS.

Configure as needed and import

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

@import "grid-coordinates"

+grid-coordinates

You can also set $overflow to false (set to true by default) to control which of Compass' two clearfix mixins will be used, +clearfix or +pie-clearfix. The default setting is true and will not clip any content that overflows a grid block. If for some reason you need to clip overflowing content, set $overflow to false in your configuration.

Using classes and @extend

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

For an example of this in use, look at grid-coordinates.com/.../demo.sass.

@extend .grid-container

@extend .nested-grid-container

@extend .grid-[columns]

@extend .grid-prefix-[columns]

@extend .grid-suffix-[columns]

@extend .grid-push-[columns]

@extend .grid-pull-[columns]

@extend .grid-full

Using mixins

Regardless if go the route of using the mixin +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.

+grid-container

+nested-grid-container

+grid([columns])

+grid-prefix([columns])

+grid-suffix([columns])

+grid-push([columns])

+grid-pull([columns])

+grid-full

License

Copyright (c) 2009 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.

grid-coordinates's People

Contributors

adamstac avatar

Stargazers

Aneesh Bhoopathy avatar

Watchers

James Cloos avatar Aneesh Bhoopathy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.