1.2.10 • Published 6 years ago

sasso v1.2.10

Weekly downloads
5
License
ISC
Repository
github
Last release
6 years ago

Sasso

NPM

$ npm i -D sasso

main.sass

With Webpack

@import ~sasso/sasso.sass

Usage

Sass

main
  @extend .row
  nav
    +grid(1, 8)
    @extend .col
  article
    +grid(5, 8)
  aside
    +grid(2, 8)

Scss

main {
  @extend .row;
  nav {
    @include grid(3, 12);
    @extend .col;
  }
  article {
    @include grid(6, 12);
  }
  aside {
    @include grid(3, 12);
  }
}

By default the margin (set as the gutter between grids) is 0. In order to increase it, grid() can receive a third argument.

main
  +grid(1, 2, 1)
// That would be a two columns grid:   
// flex-basis: 49%
// margin: 0.5%  

main
  +grid(1, 3, 0.6)
// Three columns grid:   
// flex-basis: 33%
// margin: 0.15%    

Breakpoints & Media queries

//480px
+break(xs)

//768px
+break(sm)

//992px
+break(md)

//1200px
+break(lg)

//or use a custom size
+break(672px)

Example

main
  @extend .row
  +break(sm)
    flex-flow: column
  nav
    +grid(1, 8)
    +break(xs)
      display: none
  article
    +grid(5, 8)
  aside
    +grid(2, 8)

Colors

From Material design color palette

div
  background: color(indigo)

Custom buttons, links and panels

Use the same palette.

//Create a custom Button with white background and black color
button
  +button-color(white)

//The oposite case
button
  +button-color(black)

div
  a
    +link-color(lightblue)

div
  +panel(bluegray)

Navbars & footers

Custom horizontal lists. Use justify-content values as input. The default value is flex-start

header
  ul
    +navbar(center)

footer
  ul
    +footer(flex-start)    

Helpers

+size(100%, auto)
// width & height

+position(space-around, center)
// flex justify-content & align-items

@extend .centrate
// extends to +position(center, center)

+font(16px, 200)
// font-size & font-weight

+b(green)
// border: 2px solid green
// default color red

Resets

Normalize.css is included

1.2.10

6 years ago

1.2.9

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago