Giter Site home page Giter Site logo

regrid-scss's Introduction

regrid-scss

Description

A simple SCSS grid framework inspired by Flexbox Grid and Bootstrap Grid.

Designed to crazy simple, flexible (no pun intended), and customizable.

Installation

Either include src/regrid.scss in your SASS file, or include the css in dist on your page.

<link rel="stylesheet" type="text/css" href="regrid.min.css">

Usage

Basic

Just add .col elements to a .row container!

Example:

<div class="row">
  <div class="col"></div>
  <div class="col"></div>
  <div class="col"></div>
</div>

Responsive

Classes of the format col-{breakpoint}-{size} work similarly to Bootstrap's grid. Breakpoints follow small-first priority, new sizes only being applied when the viewport reaches the minimum width defined by the breakpoints. By default, column sizes are on a 12 unit system, and the following breakpoints are available:

  • sm
  • md (min-width 640px)
  • lg (min-width 960px)
  • xl (min-width 1200px)

Example:

<div class="row">
  <div class="col-sm-12 col-md-6 col-lg-3"></div>
  <div class="col-sm-12 col-md-6 col-lg-3"></div>
  <div class="col-sm-12 col-md-6 col-lg-3"></div>
  <div class="col-sm-12 col-md-6 col-lg-3"></div>
</div>

Custom

Regrid provides some SCSS mixins of the format media-{breakpoint} to easily add responsive media queries to your stylesheets.

Example:

.foo {
  @include media-lg {
    /* Make background blue on large screens and up */
    background-color: blue;
  }
}

If you're using SCSS you can modify the number of column units as well as the breakpoints by overriding the following variables:

$grid-columns
$grid-break-md
$grid-break-lg
$grid-break-xl

regrid-scss's People

Contributors

isobit avatar

Watchers

 avatar  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.