Sha256: 5f33948a2f8cc86adede892092081684b8ea7c18960fb4ae60e3435be445c4dc

Contents?: true

Size: 1.87 KB

Versions: 1

Compression:

Stored size: 1.87 KB

Contents

// Math Functions
// ==============

// Return the width of a span
@function span(
  $span: 1
) {
  $span               : parse-span($span);

  $width              : get-span-setting(span, $span);

  $this-location      : get-span-setting(location, $span);
  $this-columns       : get-span-setting(columns, $span);
  $this-gutters       : get-span-setting(gutters, $span);
  $this-column-width  : get-span-setting(column-width, $span);
  $this-static        : get-span-setting(static, $span);

  $this-location      : if($this-location, $this-location, 1);
  $this-columns       : if($this-columns, $this-columns, $columns);
  $this-gutters       : if($this-gutters, $this-gutters, $gutters);
  $this-column-width  : if($this-column-width, $this-column-width, $column-width);
  $this-static        : if($this-static, $this-static, $static);

  $width: get-span-width($width, $this-location, $this-columns, $this-gutters, $this-column-width, $this-static);

  @return $width;
}

// Return the width of a gutter
@function gutter(
  $context: get-grid()
) {
  $context            : parse-grid($context);

  $this-columns       : get-setting(columns, $context);
  $this-gutters       : get-setting(gutters, $context);
  $this-column-width  : get-setting(column-width, $context);
  $this-static        : get-setting(static, $context);

  $this-columns       : if($this-columns, $this-columns, $columns);
  $this-gutters       : if($this-gutters, $this-gutters, $gutters);
  $this-column-width  : if($this-column-width, $this-column-width, $column-width);
  $this-static        : if($this-static, $this-static, $static);

  $width: get-gutter-width($this-columns, $this-gutters, $this-column-width, $this-static);

  @return $width;
}

// Return the width of a span, plus any attached gutters
@function outer-span(
  $span: 1
) {
  $width    : span($span);
  $gutter   : gutter($span);

  @return $width + $gutter;
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
susy-2.0.0.alpha.2 sass/susy/language/susy/_functions.scss