All Projects → juliancwirko → S Grid

juliancwirko / S Grid

Licence: mit
Flexbox grid system for Stylus

Programming Languages

stylus
462 projects

Projects that are alternatives of or similar to S Grid

Flexible Grid
Flexible grid layouts to get you familiar with building within the flexible grid system.(HTML, CSS, SASS, SCSS)
Stars: ✭ 154 (+126.47%)
Mutual labels:  flexbox-grid
dash-flexbox-grid
Wrapper around react-flexbox-grid for Plotly Dash
Stars: ✭ 19 (-72.06%)
Mutual labels:  flexbox-grid
Waffle Grid
An easy to use flexbox grid system.
Stars: ✭ 602 (+785.29%)
Mutual labels:  flexbox-grid
flex-box-grid
Responsive, mobile first Flexbox Grid
Stars: ✭ 39 (-42.65%)
Mutual labels:  flexbox-grid
mediagui
go / vuejs / vuex powered application
Stars: ✭ 22 (-67.65%)
Mutual labels:  flexbox-grid
Katana
Katana is CSS Layout System made with Flexbox
Stars: ✭ 57 (-16.18%)
Mutual labels:  flexbox-grid
Flex Grid Lite
Lightweight column grid with the power of flexbox
Stars: ✭ 116 (+70.59%)
Mutual labels:  flexbox-grid
The Flex Grid
The Flex Grid is a responsive CSS flexbox grid. Because we can!
Stars: ✭ 45 (-33.82%)
Mutual labels:  flexbox-grid
40-lines-of-Sass
Full featured flexbox grid in 40 lines of Sass
Stars: ✭ 20 (-70.59%)
Mutual labels:  flexbox-grid
Pintsize
Customisable 💪 Flexbox grid system
Stars: ✭ 330 (+385.29%)
Mutual labels:  flexbox-grid
ginger
A minimal flexbox grid system named after a cute dog.
Stars: ✭ 31 (-54.41%)
Mutual labels:  flexbox-grid
tetris-grid
◼️Lightweight and simple CSS grid
Stars: ✭ 16 (-76.47%)
Mutual labels:  flexbox-grid
zeus
A novel mobile first flexbox BEM css grid.
Stars: ✭ 14 (-79.41%)
Mutual labels:  flexbox-grid
Kindling
A pocket-sized grid system built on the flex display property.
Stars: ✭ 155 (+127.94%)
Mutual labels:  flexbox-grid
Vue Flexboxgrid
Vue components made with Flexboxgrid
Stars: ✭ 37 (-45.59%)
Mutual labels:  flexbox-grid
Frow
Flexbox Toolkit & Grid
Stars: ✭ 152 (+123.53%)
Mutual labels:  flexbox-grid
tailwind-bootstrap-grid
Tailwind CSS plugin that generates Bootstrap's flexbox grid
Stars: ✭ 96 (+41.18%)
Mutual labels:  flexbox-grid
Awesome Flexbox
👓 A curated list of CSS Flexible Box Layout Module or only Flexbox.
Stars: ✭ 1,034 (+1420.59%)
Mutual labels:  flexbox-grid
Atgrid.css
CSS Grid System with attribute selectors
Stars: ✭ 37 (-45.59%)
Mutual labels:  flexbox-grid
React Flexbox Grid
A set of React components implementing flexboxgrid with the power of CSS Modules.
Stars: ✭ 2,858 (+4102.94%)
Mutual labels:  flexbox-grid

sGrid - Flexbox Grid System for Stylus

sGrid is a Flexbox grid system built with Stylus CSS preprocessor. It is prepared to use with helper classes, like Bootstrap or Foundation does it, but also in a more semantic way by using special Stylus functions.

It has many integrations like Meteor, Grund and React.

Instalation

This is a standard Npm package so you can use it standalone, but you can also use it with boilerplates for Grunt and React. Also with Meteor.

Usage

You should use it with Autoprefixer https://github.com/jenius/autoprefixer-stylus Package for Meteor is bundled with it. It is also configured in Grunt and React boilerplates.

You'll find more complex documentation and examples here: http://stylusgrid.com/.

Simple examples

With only sGrid functions

Stylus code:

section
    grid()
    div
        padding rem-calc(15)
        cell(1, 4)
        &.other-cell
            cell(2, 4, 'bottom')
        &.different-cell
            cell(1, 3, g: 30px)

HTML code:

<section>
    <div>Lorem ipsum</div>
    <div>Lorem ipsum</div>
    <div class="other-cell">Lorem ipsum</div>
    <div>Lorem ipsum</div>
    <div class="different-cell">Lorem ipsum</div>
</section>

You can achieve the same effect with helper classes

HTML code:

<section class="s-grid-top">
    <div class="s-grid-cell s-grid-cell-md-6">Lorem ipsum</div>
    <div class="s-grid-cell s-grid-cell-md-6">Lorem ipsum</div>
    <div class="s-grid-cell s-grid-cell-bottom s-grid-cell-md-12">Lorem ipsum</div>
    <div class="s-grid-cell s-grid-cell-md-6">Lorem ipsum</div>
    <div class="s-grid-cell s-grid-cell-center s-grid-cell-md-4 s-grid-cell-offset-md-4">Lorem ipsum</div>
</section>

Overwrite settings

You can overwrite the settings (from s-grid-settings.styl file), just place your settings after s-grid-settings import. Do something like this:

// main s-grid settings file:

@import 's-grid-settings'

// my new settings goes here:

base-font-size = 16            // base font size it is 16px by default it is used to calculate rem sizes
gutter = 20px                  // gutters size
columns = 12                   // how many columns you need in your grid (usage with helper classes)
gridClassName = 's-grid'       // main grid wraper class name (usage with helper classes)
cellClassName = 's-grid-cell'  // main grid cell class name (usage with helper classes)

breakpoints = {                // media queries breakpoints
    sm: 0,
    md: 640px,
    lg: 1200px,
    xlg: 1440px,
    xxlg: 1920px
}

// s-grid imports:

@import 's-grid-functions'
@import 's-grid-classes'

// ...
// my app styles here..
// ...

 

Inspired by:

Let me know if something is wrong with sGrid, its website or React, Grunt boilerplates. I'm sure that there is much more to do with it.

Known problems

License

MIT

Changelog

v1.2.1

  • fix for 0 gutter when stylus --compress flag is used - see issue #10 ... removed 0rem value

v1.2.0

  • center(width, padding) improvements - thanks to @Splendorr. New use cases: center(1200px, 15px) ; center(80%, 5%)

v1.1.2

  • helper classes fix

v1.1.1

  • docs update

v1.1.0

  • stack() function
  • center() function
  • rwd images in cells for FF fix

v1.0.1

  • better rem-calc() function

v1.0.0

  • refactor and api changes
  • cols() is now cell()
  • Grid helper classes is optional. You can import s-grid-classes.styl file if you need it.
  • Functions parameters order is changed. See below.. you can use named parameters too.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].