Giter Site home page Giter Site logo

sass-css-grid's Introduction

sass-css-grid


CSS grid calculated with SASS

This is a simple SASS that caluculates given values into specified grid.

How to compile:
1. set up $content-width - a default max width for your page in px (eg. 980px)
2. set up $spans - as a number of 'columns' you want your grid to be divided into (eg. 16)
3. set up $spacing and $padding (both optional) - $spacing as a margin between columns and $padding as padding between them (eg. 20px). In my example I set $spacing: $base-gutter; because I have already prepared $base-gutter variable as a base value for margins and paddings throught the page.

How to use in HTML:
1. use #content or .content-grid for main holders
2. use .row class for element containing row of specified columns (might be one .row for multiple rows though)
3. put .span# class for every column: eg. if you set up your $spans to 16, and you want 2 columns, place two elements with .span8 class (eg. 2 divs) - and going further, if you want 4 columns with same width, create 4 elements with span(16/4) = that means .span4 class.
4. You can create less columns and push them to right or to left in place of empty space by applying the class .push-l-# or .push-r-# where # is the number of spans divided by 2.

sass-css-grid's People

Contributors

l3szek avatar

Stargazers

Nucleas avatar

Watchers

James Cloos avatar Leszek 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.