Coder Social home page Coder Social logo

foxsportsaustralia / scss-flex-grid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matthewsimo/scss-flex-grid

0.0 16.0 0.0 107 KB

grid using flex box & scss

Home Page: http://matthewsimo.github.io/scss-flex-grid/

License: MIT License

CSS 100.00%

scss-flex-grid's Introduction

scss-flex-grid

grid using flex box & scss Version: 0.2.0

Super simple, straight forward flex grid implementation. Check out the demo.

Features:

  • Responsive, mobile first approach
  • Define specific colum size or use a flex column (a column that grows to fill space)
  • Define offset to push column a specific number of columns.
  • Set your own number of columns!

Usage:

Just @import the _flexgrid.scss file as a partial or rename (_flexgrid.scss -> flexgrid.scss) if you'd prefer it to be compiled independently.

Use the generated classes to build your layout. I prefer to keep my markup clean and @extend the grid classes onto my elements so I don't have to muck around in html for style edits but whatever floats your boat.

Variables:

  • $fg-columns: The number of columns you wnat your grid to be, defaults to 12
  • $fg-gutter: The gutter width used for each column, defaults to 0.5rem;
  • $fg-breakpoints: The Flex Grid breakpoint object, binds grid namespaces to media queries. Read more about namespaces in the next section. Defaults to ((xs),(sm,768),(md,992px),(lg,1200px)).

Reference:

  • .row: Flex box container, use this to wrap columns.
  • .col-(namespace): This creates a column that will grow/shrink depending on available space in the defined namespace.
  • .col-(namespace)-(number): This creates a column that span the specific number of columns in the defined namespace. Default valid numbers are 1-12.
  • .off-(namespace)-(number): This will offset a column by a specific number of columns in the defined namespace. Default valid numbers are 1-11.

Valid namespaces are xs, sm, md, lg. The xs namespace is default and uses no media queries.

Coming Up:

  • Dunno, considering ideas.. But they must adhere to the super simple approach.

Notes:

  • Heavy use of sometimes not often used Sass @ directives, be sure and consult the Sass docs if something looks foreign.
  • This is for personal use, if you like and want to use it, great! But I want to keep it simple so if you have an idea feel free to add an issue but don't be upset if I don't accept a pull request. ❤️ (That's what forks are for!)
  • This purposefully doesn't account for any browser prefixes, be sure and use Autoprefixer.

Contributing:

  • Report bugs by opening a new issue
  • Have an idea? Open an issue and we can discuss it.
  • If you want to contribute some code, that's great! Open an issue for discussion first.
  • The main goal for this project is be super simple. The only requirement for users for this project will be sass, that won't change. No crazy build steps or unnecessary fluff, thanks.

scss-flex-grid's People

Contributors

matthewsimo avatar darrennolan avatar

Watchers

James Cloos avatar  avatar  avatar Steve Taylor avatar Will Archinal-Hudson avatar Chris Knowles avatar James avatar Si Nguyen avatar Ming avatar Ashis Nayak avatar Greg Chernyshov avatar Giedrius Timinskis avatar Ibrahim Abdalla avatar  avatar Roman Yakobnyuk avatar  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.