Git Product home page Git Product logo

finegrid's Introduction

FineGrid

FineGrid is a light-weight responsive grid system which provides fine-grained layout controls across screens.

It can be used on it's own or acts as a "drop-in" replacement for Twitter Bootstrap and Zurb Foundation.

FineGrid is heavily based on Foundation with similar syntax and usage.

Why ?

Grid system is of great help when laying out web pages but most popular css frameworks have a hard cut-off point at around 640px - 780px, below that point each column occupies 100% width of available space, which results in vertical stacking of each content block.

This is fine and convenient for most use cases until you want to have more fine-grained control over each layout for phone/tablet/desktop.

FineGrid allows you to assign multiple style sets to each element that can be used according to different screen sizes.

A quick syntax sample looks like this:

<div class="small-12 medium-6 large-9 columns">
	<p>
		content
	</p>
</div>

You assign different sizes to the div element according to media query result.

Here's another example, you tell the div element to hide when on mobile phone:

<div class="small-0 medium-6 large-9 columns">
	<p>
		content
	</p>
</div>

As you can see, by being able to assign multiple style sets to one element, you enjoy the benefits of grid system but also maintain flexibility.

Key Benefits

  • Three cut-off points

    1. phone: 0-480px (phone portrait and landscape)
    2. tablet: 480-1024 (tablet portrait and landscape)
    3. desktop: 1024-~ (desktop)
  • You can easily change the criteria for each cut-off points or add new ones by modifying each @media criteria, just have a look at the source and you will get a hang of it.

  • Can hide element by setting small/medium/large-0 which is easier to understand the intention.

Comparison

###With hard cut-off breakpoint you always got two layouts

▼Desktop layout

▼Mobile layout

(all content blocks are forced to be vertically stacked, no way to fine tune the layout)

###FineGrid provide flexible layout options on different screen sizes

▼Mobile layout

(by providing small, medium and large options, you can fine tune the layout for tablet and mobile phones, as seen here the layout for tablet in landscape mode)

How to use ?

Just include finegrid.css after foundation.css or bootstrap.css.

Notice

FineGrid come in un-uglified for easier reading purpose, I assume you have your favorite uglifying program in place to do the job before deployment, right ? If not, have a look at compass ;-)

Example

See example.html

Info

Created by Jeremy Lu (@thecat)

jeremy [at] pubulous.com.

Feel free to send me questions, bug reports or pull requests.

License

MIT License.

finegrid's People

Watchers

 avatar  avatar

finegrid's Issues

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.