Sha256: f579dcf09265167e1b73255dd0197f880df7c299d5c2015fb27f636f033ad162

Contents?: true

Size: 700 Bytes

Versions: 7

Compression:

Stored size: 700 Bytes

Contents

// Generic function to calculate a percentage based on pixel values
// (independent of any specific grid system)
@function calc-percent($target, $container) {
  @return $target / $container * 100%;
}

@function calc-em($target, $container) {
  @return $target / $container * 1em;
}

// shortcut name
@function cp($target, $container) {
  @return calc-percent($target, $container);
}

@function ce($target, $container) {
  @return calc-em($target, $container);
}

// return the width of an arbitrary number of columns in a css grid system
@function calc-col-width($number-of-cols) {
  $calc-width: $kit-col-width * $number-of-cols + $kit-gutter-width * ($number-of-cols - 1);
  @return $calc-width;
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
survivalkit-1.0.beta.7 stylesheets/survivalkit/functions/_calculations.scss
survivalkit-1.0.beta.6 stylesheets/survivalkit/functions/_calculations.scss
survivalkit-1.0.beta.5 stylesheets/survivalkit/functions/_calculations.scss
survivalkit-1.0.beta.4 stylesheets/survivalkit/functions/_calculations.scss
survivalkit-1.0.beta.3 stylesheets/survivalkit/functions/_calculations.scss
survivalkit-1.0.beta.2 stylesheets/survivalkit/functions/_calculations.scss
survivalkit-1.0.beta.1 stylesheets/survivalkit/functions/_calculations.scss