Git Product home page Git Product logo

flexgrid's Introduction

FlexGrid

Less Utility to quickly generate precise liquid and px perfed grid layouts

EXAMPLE in example folder at http://htmlpreview.github.io/?https://github.com/andresgallo/FlexGrid/blob/master/example/index.html

USING FLEXGRID

To use FlexGrid first import Flexgrid into yourproject

  @import (reference) 'FlexGrid';
  @import (reference) 'FlexGridFlickityPlugin' // add this one also if using flickety carousel in some of the grids

One imported just use .FlexGridMakeSizes mixin wherever you need a custom grid layout. This may be done for specific breakpoints or globally.

EXAMPLE of a grid with 4 columns (25% wide) with 20px margins in between
.GridContainer {
    .FlexGridMakeSizes(@margin: 20px, @width: 25%);
}
EXAMPLE of a grid with 2 columns (50%) with 20px between items verticall and 10
.GridContainer {
    .FlexGridMakeSizes(@margin: 20px 10px, @width: 50%);
}
EXAMPLE of a grid with items 300px wide and no margins
.GridContainer {
    .FlexGridMakeSizes(@margin: 0px, @width: 300px);
}
EXAMPLE enabling items to span 2 or three columns using data-flexspace
.GridContainer {
    .FlexGridMakeSizes(@margin: 10px, @flexSpaces: 2 3, @width: 33.33%); 
}
ADVANCED Settings

@sibling: (defaults to ~'> *') In some cases such as when using in combination with carousel scripts, HTML markup may be inserted inbetween the grid container and the items... In those cases the default selector will not be able to correctly pick the children. In that case you can explicitly pass the a selector to identify these children items.

@flexSpaces: (defaults to 1 2 3 4 5 6) Mixin will enable the grid to use flexSpaces. Using [data-flexspace=n] where n is a number allows you to tell specific items to span multiple columns

flexgrid's People

Contributors

andresgallo avatar

Watchers

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