• Stars
    star
    164
  • Rank 230,032 (Top 5 %)
  • Language
    CSS
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

grid using flex box & scss

scss-flex-grid

If you need a true grid system, I recommend using CSS Grid Layout. It's support is good enough for modern sites and applications. As such, I will no longer be spending any time maintaining this project. โœŒ๏ธ

grid using flex box & scss Version: 0.3.5

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.
  • Easily resetting offsets by namespace.
  • Set your own number of columns!
  • Set your own class names for rows, columns and offsets for nice library compatibilty!

Usage:

NPM Method
  • npm install scss-flex-grid
  • @import "../node_modules/scss-flex-grid/flex-grid";
Ye Old download/git clone method
  • 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)).
  • $fg-class-row: The class to use for rows, defaults to 'row'
  • $fg-class-col: The class to use for columns, defaults to 'col'
  • $fg-class-off: The class to use for offsets, defaults to 'off'

Reference:

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

See docs about the row, col and offset class name variables, default is 'row', 'col', 'off'.

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.

Related:

David Gรณmez has based his Unistyle Flex Grid off of this project, check it out if you're into that sort of thing. ๐Ÿ˜€

More Repositories

1

angular-vim-snippets

repo for UltiSnips & Snipmate for angular to be included as a submodule for use in your .vim directory
67
star
2

vim-config

My vim files
Vim Script
6
star
3

plank-workout

Plank Workout Angular App
JavaScript
5
star
4

meteor-react-with-iron-router

Proof of concept. Use React & Iron Router
JavaScript
5
star
5

wp-debug-toggle

CLI to quickly, without hassle, toggle debug on/off
JavaScript
4
star
6

tt-site

JavaScript
3
star
7

nextjs-xr-starter

JavaScript
3
star
8

hex-tests

Hexagonal Tile tests in Meteor.js & Crafty.js
Python
3
star
9

crafty.hexametric

isometric hexagonal grid tool to help with placing tiles
JavaScript
3
star
10

elm-starter

Simple starter project for working with Elm
Elm
2
star
11

dotfiles

my dotfils - based on mathiasbynens/dotfiles
Shell
2
star
12

Cloussn

Little Bookmarklet that Creates a cld.ly link and then runs it through lessn. Get the benefits of CloudApp, with your own domain. ABANDONWARE - cloudapp addded custom domains without tomfoolery, yay
PHP
2
star
13

proto

Starter project for simple php prototype sties
PHP
2
star
14

3dgs-webxr-viewer

Quick and dirty webxr enabled 3D Gaussian Splat Viewer. Not ready to be used.
TypeScript
2
star
15

matchH.js

Quick little jQuery plugin to match heights across elements.
JavaScript
1
star
16

Kawa

ๅท - Kawa
JavaScript
1
star
17

aoc-2022

Advent of Code for 2022
Rust
1
star
18

gart

My simple generative art/creative coding environment built on sveltekit
Svelte
1
star
19

matthewsimo.com-v1

Sinatra App running http://matthewsimo.com
CSS
1
star
20

figma-plugin-variable-transformer

Archived: Figma plugin to turn Figma variables into CSS Custom Properties
HTML
1
star
21

intro-to-react

JavaScript
1
star
22

pixum

Command Line Tool For http://lorempixum.com/
1
star
23

figma-variable-visualizer

WIP: Figma Plugin to visualize your variables
TypeScript
1
star