npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

custom.gs

v5.1.3

Published

![Custom Grid System](https://raw.github.com/luizgamabh/custom.gs/master/assets/img/logo.png) # [http://custom.gs](http://custom.gs)

Downloads

2

Readme

Custom Grid System

http://custom.gs

Custom Grid System is a new grid system completely customizable for any need.

How it works?

your_nice_component.sass:

@import "custom"

main
  +container(1024px)

section
  +grid(6, 10)

aside
  +grid(4, 10)

your_nice_component.html:

<main>
    <section>
        First column
    </section>
    <aside>
        Second column
    </aside>
</main>

NESTED GRIDS

.parent
  +grid(1, 2, $parent: true)
  .child
    +grid(1, 3)

Documentation

General grid options:

  • $default-container-with: ==100% !default== width measure with unit - Website width limits
  • $default-gutter: ==24px !default== width measure with unit - Space between columns
  • $default-cols: ==12 !default== integer - Default amount of columns
  • $default-direction: =='ltr' !default== string - ltr: Left-to-right or rtl: Right-to-left
  • $default-edges: ==true !default== boolean - Enable gutter on edges (extremities)?

Mixins:

+container( [ $optional_params ] )

Defines your container with desired width, if ommited uses $default-container-width general variable.

Optional params

$clear: Default: false | Clear the container (can be used to disable the container in some breakpoint). $width: Container width $margin: Container margin $padding: Container padding

Example:

.main
  +container
.footer
  +container(1024px)
@media only screen and (max-width: 768px)
  .main
    +container($clear: true)

+grid($cols, [ $total, $helpers] )

Defines your grid column

Mandatory params

$cols: number of columns (integer)

Optional params

$total: Default: $default-cols | Defines a new reference overwriting the $default-cols just for this specific element.

Helper options

$gutter: width measure with unit. Overrides $default-gutter variable. $edges: boolean. Overrides $default-edges variable. $cycle: integer. Forces a breakpoint after x elements. $uncycle: integer. Removes cycle breakpoints. $direction: string (ltr or rtl). Overrides $default-direction variable. $prefix: integer. Prefix with an empty space of x columns. $suffix: integer. Suffix with an empty space of x columns. $push: integer. Pushes the column x times. $pull: integer. Pulls the column x times. $parent: boolean. Remove margins when $edges are enabled.

Examples:

$default-edges: true
$default-cols: 10

.header
  +container

  .header__title
    +grid(1, 2, $push: 1)

  .header__menu
    +grid(1, 2, $pull: 1)

.main
  +container

  .gallery__list
    +grid(10, 16, $parent: true)

    .gallery__list-item
      +grid(1, 4, $cycle: 4)

  .side
    +grid(6, 16)

.footer
  +container

  .footer__left,
  .footer__right
    +grid(5)

+expand()

Forces a full window column inside container, extrapolating the container width.

Uses viewport units and does not work on IE8

Examples:

.main
  +container
  .full-column
    +expand

+prefix( $cols, [ $total: $number-of-columns ] )

Insert empty space before a grid column.

Mandatory params

$cols: integer | Prefixes the current column with blank space equivalent to x columns.

Optional params

$total: integer | Defines a new reference overwriting the $number-of-columns just for this specific element.

Helper params

$gutter: integer | Defines a new reference overwriting the $number-of-columns just for this specific element. $edges: integer | Defines a new reference overwriting the $number-of-columns just for this specific element.

Example:

$default-cols: 10

.my_indented_element
  +grid(9, $prefix: 1)

.alone_and_depressive_element
  +grid(1, 5, $prefix: 4)

.another_alone_element
  +grid(1, 5)
  +prefix(4, 5)

+suffix( $cols, [ $total: $number-of-columns ] )

Insert empty space after a grid column.

Mandatory params

$cols: integer | Suffixes the current column with blank space equivalent to x columns.

Optional params

$total: integer | Defines a new reference overwriting the $number-of-columns just for this specific element.

Helper params

$gutter: integer | Defines a new reference overwriting the $number-of-columns just for this specific element. $edges: integer | Defines a new reference overwriting the $number-of-columns just for this specific element.

Example:

$default-cols: 10

.my_outdented_element
  +grid(9, $suffix: 1)

.centralized_alone_and_depressive_element
  +grid(1, 5, $prefix: 2, $suffix: 2)

.another_alone_element
  +grid(1, 5)
  +prefix(2, 5)
  +suffix(2, 5)

+push( $cols, [ $total, $relative ] )

Rearrange element position.

Mandatory params

$cols: integer | Repositions the element x $cols after.

Optional params

$total: integer | Defines a new reference overwriting the $default-cols just for this specific element. $relative: boolean | Adds position: relative; property to element, default ==true==.

Example:

$default-cols: 10

.send_me_to_right
  +grid(5)
  +push(5)

#### +pull( $cols, [ $total, $relative ] )
Rearrange element position.

###### Mandatory params
`$cols`: integer | Repositions the element x `$cols` before.

###### Optional params
`$total`: integer | Defines a new reference overwriting the $default-cols just for this specific element.
`$relative`: boolean | Adds `position: relative;` property to element, default ==true==.

Example:
```sass
$default-cols: 10

.send_me_to_right
  +grid(5)
  +push(5)

.send_me_to_left
  +grid(5)
  +pull(5)

.send_me_to_left_encapsulated_way_same_result
  +grid(5, $pull: 5)

+gutter([ $edges ])

Insert default gutter on any element.

Optional params

$edges: boolean | Enable or disable edges overriding $default-edges

Example:

.omg_i_must_have_the_global_grid_gutter
  +gutter

+clear()

Clear floated elements

Example:

.i_am_a_motherfucker_element_and_i_will_break_this_grid
  +clear

+clearfix()

Inserts a clearfix. Everybody knows what is that!

Example:

.please_i_wanna_see_my_size
  +clearfix

Recomendations

Increase the accuracy of relative measures, or an evil goat will eat your socks!

It is highly recommended that you work with precision when dealing with measures. At your compass.rb or config.rb file, add the following line:

Sass::Script::Number.precision = 10